AlgoGenesis / C

AlgoGenesis is a centralized open-source platform dedicated to providing optimized and well-documented algorithm implementations in C. Perfect for both beginners and advanced users, this repository serves as a comprehensive learning resource for solving algorithmic challenges.
MIT License
81 stars 252 forks source link

[Adding Circular Queue] #1260

Open DinkyRajpoot56 opened 2 hours ago

DinkyRajpoot56 commented 2 hours ago

Issue will be closed if:

1) You mention more than one algorithm. You can create a separate issue for each algorithm once the current one is completed.
2) You propose an algorithm that is already present or has been mentioned in a previous issue.
3) You create a new issue without completing your previous issue.

Note: These actions will be taken seriously. Failure to follow the guidelines may result in the immediate closure of your issue.


Name:

[Circular Queue]

About:

A Circular Queue is an extended version of a normal queue where the last element of the queue is connected to the first element of the queue forming a circle.The operations are performed based on FIFO (First In First Out) principle. It is also called ‘Ring Buffer’.Operations on Circular Queue: Front: Get the front item from the queue. Rear: Get the last item from the queue. enQueue(value) This function is used to insert an element into the circular queue. In a circular queue, the new element is always inserted at the rear position. Check whether the queue is full – [i.e., the rear end is in just before the front end in a circular manner]. If it is full then display Queue is full. If the queue is not full then, insert an element at the end of the queue. deQueue() This function is used to delete an element from the circular queue. In a circular queue, the element is always deleted from the front position. Check whether the queue is Empty. If it is empty then display Queue is empty. If the queue is not empty, then get the last element and remove it the queue.


Labels:

new algorithm, gssoc-ext, hacktoberfest, level1


Assignees:

github-actions[bot] commented 2 hours ago

👋 Thank you for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!