Multiple choice

Which data structure is last-in-first-out?

  1. Stack

  2. Queue

  3. Linked list

  4. Binary tree

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A stack follows the Last-In-First-Out (LIFO) principle, where the most recently added element is the first one to be removed. This is analogous to a stack of plates.