Python || Solver can optionally print *all*  solutions
Intuition\nPick any two numbers apply any operation, and replace the two numbers with their result. We now have a smaller problem.\n\n# Code\n\nclass Solution:\
# Intuition\nPick any two numbers apply any operation, and replace the two numbers with their result. We now have a smaller problem.\n\n# Code\n```\nclass Solution:\n    def judgePoint24(self, cards: List[int]) -> bool:\n        def compute(a,b,op):\n            if op==0:\n                return a+b\n            if op==1:\n                return a-b\n            if op==2:\n                return a*b\n            return a/b\n\n        def solve(nums: List[int]):\n            nonlocal solCount\n            n = len(nums)\n            if n==1:\n                if goal-e < nums[0] < goal+e:\n                    # print(sol)\n                    solCount += 1\n                return\n            # stop at one solution\n            if solCount>0:\n                return\n            for i in range(n):\n                for j in range(n):\n                    if i==j: continue\n                    for op in range(3 + (nums[j]!=0)):\n                        if i>j and op%2==0: continue\n                        x = compute(nums[i], nums[j], op)\n                        nums2 = [x]\n                        for k in range(n):\n                            if k!=i and k!=j:\n                                nums2.append(nums[k])\n                        # sol.append("%s = %s%s%s"%(x,nums[i],operator[op],nums[j]))\n                        solve(nums2)\n                        # sol.pop()\n\n        e = 10**-5\n        goal = 24\n        operator = "+-*/"\n        sol = []\n        solCount = 0\n        solve(cards)\n        # print(solCount)\n        return solCount>0\n\n```
['Python3']