Computer Science EngineeringEasy

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

  1. A. Queue
  2. B. Stack
  3. C. Min-heap
  4. D. Linked list

Correct answer: B. Stack

A stack removes the most recently inserted element first.

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic