Skip to main contentSkip to solution

Stack works on the principle of _____.

Solution

✅ Correct Option: 4

A stack lets you add (push) and remove (pop) items only at one end, called the top. The item pushed last sits on top, so it is the first one popped. This is Last-In-First-Out (LIFO), like a pile of plates where you take the top plate first.


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

Option 2: Last-In-Last-Out is not a standard principle of any basic data structure.

Option 3: Enqueue and dequeue are the insertion and deletion 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