Parses then computes RPN expressions. Iterative algorithm, not the naive one! Problem originated from http://codingdojo.org/kata/. Further reading at https://en ...
class Solution(object): def evalRPN(self, tokens): """ :type tokens: List[str] :rtype: int """ def cal(op, op1, op2): if op == '*': return op1 * op2 elif op ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results