Skip to content
Sign in
Computer

DSA (Stack) follows which principle?

Tap an option to check the answer. You can also press A–D.

Explanation
A stack is a data structure where the last element added is the first to be removed. LIFO stands for Last In, First Out, reflecting this behavior. Common examples include undo features in software and browser back buttons. Stacks are used in function calls, recursion, and expression evaluation in programming.