A stack is a LIFO structure with push, pop and peek in O(1). Uses: function calls, undo, expression evaluation, infix-to-postfix conversion, backtracking.
1Infix to postfix
Operands go directly to the output
Push '('; on ')' pop until '('
Pop operators of higher (or equal, for left-associative) precedence before pushing a new one
Precedence: ^ > * / > + −; ^ is right-associative