Which of the following is true in the context of Stack?
Which of the following is true in the context of Stack?
Solution
✅ Correct Option: 2
A stack follows the LIFO (Last In, First Out) principle. Insertion (push) and removal (pop) both happen only at one end, called the top, so the element entered last is the first to be removed.
Option 1: this describes a queue (FIFO), a common confusion with stack.
Option 3: removal from any position is not allowed in a stack; only the top element can be removed.
Option 4: a stack is a linear data structure, since elements are arranged in a sequence.
Related questions:
2025: 27 May Shift 2
2025: 14 May Shift 1
2026: 18 May Shift 2