A queue will behave like _____, if insertion and deletion occurs at same end.
A queue will behave like _____, if insertion and deletion occurs at same end.
Solution
✅ Correct Option: 3
A stack follows LIFO (Last In, First Out), where both insertion (push) and deletion (pop) happen at the same end, called the top. If a queue is restricted so that both operations occur at one end, the element added last is the first to be removed, which is exactly stack behaviour.
Option 2: a normal queue inserts at the rear and deletes at the front (FIFO), so it needs two different ends.
Option 1 and Option 4: lists and arrays are general storage structures with no fixed rule about which end is used for insertion or deletion.
Related questions:
2025: 27 May Shift 2