158. Evaluate a Postfix Expression
In postfix notation the operator comes AFTER its two operands, so 2 3 +
means 2 + 3, and no brackets are ever needed.
Read n tokens on one line, integers and the operators + - * /, and print the value
of the expression.
Division truncates toward zero, and never divides by zero. The expression is always valid.
Constraints - `1 ≤ n ≤ 100000` - Operands fit in a 64-bit integer. - The result fits in a 64-bit integer.
Input
The first line contains an integer n, the number of tokens.
The second line contains n space-separated tokens, integers and the operators + - * /, in postfix order.
Output
Print one integer, the value of the expression.
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.