题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. Some examples: ["2", "1",
题目 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. Note: Division between two integ
题目 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. Some examples: ["2", "1", "
https://leetcode.com/problems/evaluate-reverse-polish-notation/?tab=Description 开一个栈,遇到数字压栈,遇到运算符就从栈中弹出两个元素做相应的计算然后再压回去。 Time complexity: O(n) Space complexity: O(n) class Solution {public:int evalR