write an algorithm to insert and delete an element into a linear queue.
Answers
Answered by
0
Answer:
Enqueue Operation
Step 1 − Check if the queue is full.
Step 2 − If the queue is full, produce overflow error and exit.
Step 3 − If the queue is not full, increment rear pointer to point the next empty space.
Step 4 − Add data element to the queue location, where the rear is pointing.
Step 5 − return success.
Explanation:
Similar questions