Easy to understand recursive JAVA solution
\nclass Solution {\n    public boolean judgePoint24(int[] nums) {\n        List<Double> list = new ArrayList<>();\n        for (int num : nums) list.add((double
```\nclass Solution {\n    public boolean judgePoint24(int[] nums) {\n        List<Double> list = new ArrayList<>();\n        for (int num : nums) list.add((double) num);\n        return can(list);\n    }\n    \n    private boolean can(List<Double> list) {\n        if (list.size() == 1) return (Math.abs(list.get(0) - 24.0) < 0.001);\n        for (int i = 0; i < list.size(); i++) {\n            for (int j = i + 1; j < list.size(); j++) {\n                List<Double> combined = new ArrayList<>();\n                combined.add(list.get(i) + list.get(j));\n                combined.add(list.get(i) - list.get(j));\n                combined.add(list.get(j) - list.get(i));\n                combined.add(list.get(i) * list.get(j));\n                combined.add(list.get(i) / list.get(j));\n                combined.add(list.get(j) / list.get(i));\n                List<Double> rest = new ArrayList<>();\n                for (int k = 0; k < list.size(); k++) {\n                    if (k != i && k != j) rest.add(list.get(k));\n                }\n                for (int l = 0; l < combined.size(); l++) {\n                    rest.add(combined.get(l));\n                    if (can(rest)) return true;\n                    rest.remove(rest.size() - 1);\n                }\n            }\n        }\n        return false;\n    }\n}\n```
[]