Reverse Polish Notation is evaluated using a stack.
Scan tokens:
a, b, compute a op b, and push the result.
Division truncates toward zero.Every operator applies to the most recent two values that haven’t yet been combined.
Reverse Polish Notation is evaluated using a stack.
Scan tokens:
a, b, compute a op b, and push the result.
Division truncates toward zero.Every operator applies to the most recent two values that haven’t yet been combined.