Insertion and deletion in a queue takes place respectively at which end?A. Front B. Rear C. Middle D. Second element from right end E. Second element from left end
Show Hint
Queues follow FIFO, meaning the first element inserted is the first one to be removed, with operations occurring at the front and rear ends.
In a queue, insertion (enqueue) takes place at the rear end (B), while deletion (dequeue) happens at the front end (A). This is the fundamental principle of queue data structure, following FIFO (First In, First Out) order.