Which data structure follows the LIFO principle?
-
A
Queue
-
B
Stack
Correct answer
-
C
Linked List
-
D
Tree
16 views
Explanation
Stack follows Last-In-First-Out (LIFO) principle where the last element added is the first to be removed.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ