Stacks appear whenever you need to remember something and then process it in reverse order:
Parentheses matching: push opens, pop on closes
Expression evaluation: handle operators and operands
Undo functionality: push actions, pop to undo
DFS traversal: iterative depth-first search
Call stack: how recursion works Whenever you see "matching pairs" or "most recent unpaired element," think stack.