Insertion & deletion of elements accomplished in Queues - Data Structure

Q.  From where does the insertion and deletion of elements get accomplished in Queues?
- Published on 19 Oct 15

a. Front & Rear ends respectively
b. Rear & Front ends respectively
c. Only Front ends
d. Only Rear ends

ANSWER: Rear & Front ends respectively


  • Nirja Shah   -Posted on 16 Nov 15
    Queue is a linear data structure in which elements can be inserted only at one end called rear and deleted at the other end called in front of the queue. It works on FIFO principle. In a queue the insertion operation is also known as enqueue and deletion is known as dequeue. When we implement queue, generally it takes front and rear as variable and initially when the queue is empty, the value of both front and rear will be -1.

Post your comment / Share knowledge

Enter the code shown above:
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)