In a dequeue, if insertion and deletion of elements is done from the opposite end, it will behave as ____________.
In a dequeue, if insertion and deletion of elements is done from the opposite end, it will behave as ____________.
Solution
✅ Correct Option: 1
A deque allows insertion and deletion at both ends. If elements are inserted at one end (say the rear) and deleted from the opposite end (the front), the first element in is the first out. This is FIFO order, which is how a queue behaves.
Option 2: a stack needs insertion and deletion at the same end (LIFO), not opposite ends.
Options 3 and 4: list and array are general data structures with no fixed insertion/deletion order, so they are not what this end-to-end behaviour produces.
Related questions:
2025: 22 May Shift 1
2025: 30 May Shift 2
2025: 13 May Shift 2
2026: 29 May Shift 1