Short python solution
Saw somebody is creating a whole num class and using operator overload to avoid double comparison error, but I think doing espilon comparison is good enough..\n
Saw somebody is creating a whole num class and using operator overload to avoid double comparison error, but I think doing espilon comparison is good enough..\n"""\nclass Solution:\n    def judgePoint24(self, nums: \'List[int]\') -> \'bool\':\n        return self.helper(nums)\n    \n    def helper(self,lst):\n        if len(lst) == 1:\n            eps = 0.00000001\n            if abs(lst[0]- 24) <= eps:\n                return True\n            return False\n        \n        for i in range(0,len(lst)):\n            for j in range(0,len(lst)):\n                if i == j:\n                    continue\n                newLst = []\n                for k in range(0,len(lst)):\n                    if k != i and k != j:\n                        newLst.append(lst[k])\n                        \n                if self.helper(newLst + [ lst[i] + lst[j] ]):\n                    return True\n                if self.helper(newLst + [lst[i] - lst[j]]):\n                    return True\n                if self.helper(newLst + [lst[i] * lst[j]]):\n                    return True\n                if lst[j] != 0 and self.helper(newLst + [lst[i] / lst[j]]):\n                    return True\n        return False\n\n"""
[]