Question:medium

Which data structure follows the Last-In-First-Out (LIFO) principle?

Show Hint

A stack follows the LIFO principle, meaning the last element added is the first one to be removed.
Updated On: Jan 16, 2026
  • Queue
  • Stack
  • Linked List
  • Array
Show Solution

The Correct Option is B

Solution and Explanation

The Last-In-First-Out (LIFO) principle governs stacks, meaning the most recently added element is the first to be retrieved. This is analogous to a stack of plates, where additions and removals occur at the top.
- Queue (A) adheres to the First-In-First-Out (FIFO) principle; the first element added is the first one removed.
- Linked List (C) is a linear data structure not inherently bound by LIFO or FIFO, allowing diverse element access.
- Array (D), a fixed-size data structure, does not inherently follow either LIFO or FIFO principles.
Therefore, (B) Stack is the correct selection.
Was this answer helpful?
1