Two-Stack Algorithm
Goal: Evaluate Infix Expressions
Ex: (1 + (( 2 + 3 ) ( 4 5 )))
-
Value: Push onto the value stack
-
Operator: Push onto the operator stack
-
Left parenthesis: ignore
-
Right parenthesis: pop operator and two values, push the result of applying that operator onto the operand stack.