What is a Stack in Data Structures?

2025

What is a Stack in Data Structures?

  1. A.

    A linear data structure that follows the LIFO (Last In First Out) principle

  2. B.

    A linear data structure that follows the FIFO (First In First Out) principle

  3. C.

    A non-linear data structure that follows the LIFO (Last In First Out) principle

  4. D.

    None of the above

Attempted by 540 students.

Show answer & explanation

Correct answer: A

A stack is a linear data structure that follows the LIFO (Last In First Out) principle, meaning that the last element inserted into the stack will be the first one to be removed.

Explore the full course: Cocubes Preparation