Skip to main contentSkip to solution

Stack follows the ______________ principle.

Solution

✅ Correct Option: 1

A stack follows the Last-In-First-Out (LIFO) principle: the element inserted most recently (push) is the first one removed (pop). Both operations happen at one end, called the top.

Think of a pile of plates: you add a plate on top and also take one from the top.


Option 2: First-In-First-Out is the principle of a queue, not a stack.

Option 3: Enqueue and Dequeue are the insert and delete operations of a queue. A stack uses push and pop.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question