What is a Stack in Data Structures?
2025
What is a Stack in Data Structures?
- A.
A linear data structure that follows the LIFO (Last In First Out) principle
- B.
A linear data structure that follows the FIFO (First In First Out) principle
- C.
A non-linear data structure that follows the LIFO (Last In First Out) principle
- 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.