Python beats 95%
Python seems to have float precision problem so we need to manually check the returned results.\nUsing set to filter out duplicate numbers.\n\n    def judgePoin
Python seems to have float precision problem so we need to manually check the returned results.\nUsing set to filter out duplicate numbers.\n```\n    def judgePoint24(self, nums):\n        """\n        :type nums: List[int]\n        :rtype: bool\n        """\n\n        def helper(start, end, arr):\n            if start == end:\n                return [arr[start]]\n            results = set()\n            for i in range(start, end):\n                left = helper(start, i, arr)\n                right = helper(i + 1, end, arr)\n\n                for l in left:\n                    for r in right:\n                        results.add(l + r)\n                        results.add(l * r)\n                        if r != 0:\n                            results.add(l / float(r))\n                        results.add(l - r)\n            return results\n\n        def check(s):\n            for val in s:\n                if abs(val - 24) < 0.0002:\n                    return True\n\n        import itertools\n        for arr in itertools.permutations(nums):\n            if check(helper(0, 3, arr)):\n                return True\n        return False\n```
[]