Simple Python
\n\'\'\'\nBecause of (), we can give +, - the same priority as *, /\nPick any two numbers from nums, calculate results for all possible operations with these tw
```\n\'\'\'\nBecause of (), we can give +, - the same priority as *, /\nPick any two numbers from nums, calculate results for all possible operations with these two nums.\nTry each result by adding the result to remaining numbers and solve the problem recursively.\nReturn True, if the last number is 24.\nTime: O(1), 2A4*4*2A3*4*2A2*4 = 12*4*6*4*2*4\nSpace: O(1)\n\'\'\'\nclass Solution:\n    def judgePoint24(self, nums: List[int]) -> bool:\n        if len(nums)==1:\n            return round(nums[0], 4) == 24\n        \n        nums_len = len(nums)\n        for left in range(nums_len-1):\n            for right in range(left+1, nums_len):\n                remain = nums[:left]+nums[left+1:right]+nums[right+1:]\n                left_val, right_val = nums[left], nums[right]\n                if self.judgePoint24(remain+[left_val+right_val]):\n                    return True\n                if self.judgePoint24(remain+[left_val-right_val]):\n                    return True\n                if self.judgePoint24(remain+[left_val*right_val]):\n                    return True\n                if right_val and self.judgePoint24(remain+[left_val/right_val]):\n                    return True\n                if self.judgePoint24(remain+[right_val-left_val]):\n                    return True\n                if left_val and self.judgePoint24(remain+[right_val/left_val]):\n                    return True\n        return False\n                \n```
['Backtracking']