Python > 90% ignore brackets solution (O(1) ~= 13824)
\nimport itertools\nclass Solution(object):\n    def judgePoint24(self, nums):\n        """\n        :type nums: List[int]\n        :rtype: bool\n        """\n 
```\nimport itertools\nclass Solution(object):\n    def judgePoint24(self, nums):\n        """\n        :type nums: List[int]\n        :rtype: bool\n        """\n        Ops = list(itertools.product([add,sub,mul,div], repeat=3))\n        for ns in set(itertools.permutations(nums)):\n            for ops in Ops:\n                # (((W op X) op Y) op Z)\n                result = ops[0](ns[0], ns[1])\n                result = ops[1](result, ns[2])\n                result = ops[2](result, ns[3])\n                if 23.99 < result < 24.01:\n                    return True\n\n                # (Z op (Y op (W op X)))\n                result = ops[0](ns[0], ns[1])\n                result = ops[1](ns[2], result)\n                result = ops[2](ns[3], result)\n                if 23.99 < result < 24.01:\n                    return True\n\n                # ((W op X) op (Y op Z))\n                result1 = ops[0](ns[0], ns[1])\n                result2 = ops[1](ns[2], ns[3])\n                result = ops[2](result1, result2)\n                if 23.99 < result < 24.01:\n                    return True\n        return False\n\ndef add (a, b):\n    return a+b\ndef sub (a, b):\n    return a-b\ndef mul (a, b):\n    return a*b\ndef div (a, b):\n    if b == 0:\n        return 0\n    return a/float(b)\n```\nFirst I iterate all the unique permutations of the provided 4 numbers (make sure uniqueness by using a set).\n\nThen as you can see from my comments, there are 3 possible situations when brackets are involved so I tried to check all of them in 1 for loop.\n\nSince each operation can be repeated and exactly 3 operations need to be used, I decided to store the cartesian product of all the possible operation functions in a list to iterate all possibilities.\n\nTime complexity I believe is: 64 * 9 * 24 = 13824 => O(1)
[]