@@ -0,0 +1,2766 @@
+/*%0A * Evaluate the value of an arithmetic expression in Reverse Polish Notation.%0A * Valid operators are +, -, *, /. Each operand may be an integer or another expression.%0A * Some examples:%0A *  %5B%222%22, %221%22, %22+%22, %223%22, %22*%22%5D -%3E ((2 + 1) * 3) -%3E 9%0A *  %5B%224%22, %2213%22, %225%22, %22/%22, %22+%22%5D -%3E (4 + (13 / 5)) -%3E 6%0A */%0A %0Apublic class Solution %7B%0A    public int evalRPN(String%5B%5D tokens) %7B%0A        ArrayList%3CString%3E wordlist = new ArrayList%3CString%3E(Arrays.asList(tokens));%0A        int loc = 0;%0A        int leftoperand;%0A        int rightoperand;%0A        int operandafter = 0;%0A        String symbol;%0A%0A        if(wordlist.size()==1) operandafter = Integer.parseInt(wordlist.get(loc));%0A        while(wordlist.size()!=1)%7B%0A            symbol = wordlist.get(loc);%0A            switch(symbol)%7B%0A                case %22+%22:%0A                    leftoperand = Integer.parseInt(wordlist.get(loc - 2));%0A                    rightoperand = Integer.parseInt(wordlist.get(loc - 1));%0A                    operandafter = leftoperand + rightoperand;%0A                    wordlist.remove(loc - 2);%0A                    wordlist.remove(loc - 2);%0A                    wordlist.set(loc - 2, Integer.toString(operandafter));%0A                    loc--;%0A                    break;%0A                case %22-%22:%0A                    leftoperand = Integer.parseInt(wordlist.get(loc - 2));%0A                    rightoperand = Integer.parseInt(wordlist.get(loc - 1));%0A                    operandafter = leftoperand - rightoperand;%0A                    wordlist.remove(loc - 2);%0A                    wordlist.remove(loc - 2);%0A                    wordlist.set(loc - 2, Integer.toString(operandafter));%0A                    loc--;%0A                    break;%0A                case %22*%22:%0A                    leftoperand = Integer.parseInt(wordlist.get(loc - 2));%0A                    rightoperand = Integer.parseInt(wordlist.get(loc - 1));%0A                    operandafter = leftoperand * rightoperand;%0A                    wordlist.remove(loc - 2);%0A                    wordlist.remove(loc - 2);%0A                    wordlist.set(loc - 2, Integer.toString(operandafter));%0A                    loc--;%0A                    break;%0A                case %22/%22:%0A                    leftoperand = Integer.parseInt(wordlist.get(loc - 2));%0A                    rightoperand = Integer.parseInt(wordlist.get(loc - 1));%0A                    operandafter = leftoperand / rightoperand;%0A                    wordlist.remove(loc - 2);%0A                    wordlist.remove(loc - 2);%0A                    wordlist.set(loc - 2, Integer.toString(operandafter));%0A                    loc--;%0A                    break;%0A                default:%0A                    loc++;%0A                    break;%0A                    %0A            %7D%0A        %7D%0A        return operandafter;%0A    %7D%0A%7D%0A

Create EvaluateReversePolishNotation.java