Python solution
The main idea is to shorten the array by one operation in each iteration. Thus, we take first element from cards a and second from cards b, perform operation an
The main idea is to shorten the array by one operation in each iteration. Thus, we take first element from cards `a` and second from cards `b`, perform operation and merge it with what is left.\n\n```\nclass Solution:\n    def judgePoint24(self, cards: List[int]) -> bool:\n        if len(cards) == 1: return abs(cards[0] - 24) < 0.1\n        for i,a in enumerate(cards):\n            for j,b in enumerate(cards):\n                if i == j: continue\n                left = [cards[k] for k in range(len(cards)) if k != i and k != j]\n                for x in [a+b, a-b, a*b, b and a/b]:\n                    if self.judgePoint24(left+[x]): return True\n        return False\n```
[]