← 返回 stripe 的题目列表Evaluate Reverse Polish Notation
类型:online_judge
Given an array that represents a Reverse Polish Notation expression, evaluate its value. Valid operators are +, -, , and /. Each operand may be an integer or another expression. Note: Integer division should truncate toward zero. Example inputs: ["2", "1", "+", "3", ""] results in 9; ["4", "13", "5", "/", "+"] results in 6.
Example
Input
["2", "1", "+", "3", "*"]