0
16kviews
Write an Algorithm for implementing queue using array.
2 Answers
2
701views


Queue using Arrays : -


Algorithm : -

Step 1: IF REAR = MAX - 1
Write OVERFLOW
Go to step
[END OF IF]

Step 2: IF FRONT = -1 and REAR = -1
SET FRONT = REAR = 0
ELSE
SET REAR = REAR + 1
[END OF IF] …

Create a free account to keep reading this post.

and 2 others joined a min ago.

1
743views

Queue using Array

  • A queue is a data structure that can be implemented using linear arrays or a one-dimensional array.
  • The implementation of queue data structure using a one-dimensional array is very simple and easy.
  • This requires a one-dimensional array of well-defined size.
  • Then insert or delete operation can be …

Create a free account to keep reading this post.

and 4 others joined a min ago.

Please log in to add an answer.