public List<Integer> diffWaysToCompute(String str) {
        List<Integer> operands = new ArrayList<>();
        List<Character> operators = new ArrayList<>();
        int prev = -1;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '+' || str.charAt(i) == '-' || str.charAt(i) == '*') {
                operands.add(Integer.parseInt(str.substring(prev + 1, i)));
                operators.add(str.charAt(i));
                prev = i;
            }
        }
        operands.add(Integer.parseInt(str.substring(prev + 1, str.length())));
        return diffWaysToComputeUtil(operands, operators, 0, operators.size() - 1);
    }
https://leetcode.com/problems/different-ways-to-add-parentheses/
src/com/interview/recursion/DifferentWaysToAddParentheses.java