Skip to content

Commit

Permalink
Queue using array
Browse files Browse the repository at this point in the history
  • Loading branch information
WaderManasi committed Sep 5, 2020
1 parent a661e76 commit 6354c9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Queue/QueueUsing_Array.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

//rear :ahead
//front :to pop out element

/* The method push to push element into the queue */
void MyQueue :: push(int x)
{
Expand All @@ -9,7 +13,7 @@ void MyQueue :: push(int x)
poped out of the queue*/
int MyQueue :: pop()
{
//
//all the elements are popped
if(front==rear)
{
front=rear=0;
Expand Down

0 comments on commit 6354c9b

Please sign in to comment.