![]() ![]() First, we check whether the Queue is empty or not.The steps of dequeue operation are given below: When front =0 & rear = max-1, which means that front is at the first position of the Queue and rear is at the last position of the Queue.Īlgorithm to insert an element in a circular queue.There are two cases in which the element cannot be inserted: If front != 0 and rear = max - 1, it means that queue is not full, then set the value of rear to 0 and insert the new element there. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |