Enqueue OperationQueues maintain two data pointers, front and rear. Therefore, its operations are comparatively difficult to implement than that of stacks.The following steps should be taken to enqueue (insert) data into a queue −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. - Study24x7
Social learning Network
22 Mar 2019 10:50 AM study24x7 study24x7

Enqueue Operation

Queues maintain two data pointers, front and rear. Therefore, its operations are comparatively difficult to implement than that of stacks.The following steps should be taken to enqueue (insert) data into a queue −Step 1 − Check if the queue is full.

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles