[JAVA] Easy to understand. Backtracking.
\nclass Solution {\n\n    boolean res = false;\n    final double eps = 0.001;\n\n    public boolean judgePoint24(int[] nums) {\n        List<Double> arr = new A
```\nclass Solution {\n\n    boolean res = false;\n    final double eps = 0.001;\n\n    public boolean judgePoint24(int[] nums) {\n        List<Double> arr = new ArrayList<>();\n        for(int n: nums) arr.add((double) n);\n        helper(arr);\n        return res;\n    }\n\n    private void helper(List<Double> arr){\n        if(res) return;\n        if(arr.size() == 1){\n            if(Math.abs(arr.get(0) - 24.0) < eps)\n                res = true;\n            return;\n        }\n        for (int i = 0; i < arr.size(); i++) {\n            for (int j = 0; j < i; j++) {\n                List<Double> next = new ArrayList<>();\n                Double p1 = arr.get(i), p2 = arr.get(j);\n                next.addAll(Arrays.asList(p1+p2, p1-p2, p2-p1, p1*p2));\n                if(Math.abs(p2) > eps)  next.add(p1/p2);\n                if(Math.abs(p1) > eps)  next.add(p2/p1);\n                \n                arr.remove(i);\n                arr.remove(j);\n                for (Double n: next){\n                    arr.add(n);\n                    helper(arr);\n                    arr.remove(arr.size()-1);\n                }\n                arr.add(j, p2);\n                arr.add(i, p1);\n            }\n        }\n    }\n}\n\n```
[]