Python | O(n) simple
We are interested in number of left and right child the X node has. Our case of winning is in either of 2 scenarios:\n1. I get any child (left or right) with ma
We are interested in number of left and right child the X node has. Our case of winning is in either of 2 scenarios:\n1. I get any child (left or right) with majority of nodes then I can block his coloring\n2. If parent has majority, I can select parent to block other half from red color\n```\nclass Solution:\n    def btreeGameWinningMove(self, root: TreeNode, n: int, x: int) -> bool:\n        val = []\n        \n        def traverse(node: TreeNode):\n            nonlocal x,val\n            if not node: return 0\n            \n            l = traverse(node.left)\n            r = traverse(node.right)\n            if node.val == x: val = [l,r]\n            \n            return l+r+1\n        \n        traverse(root)\n        l,r = val\n        \n        #Either child has majority or select parent for majority\n        return True if max(l,r) > n//2 or l+r+1 <= n//2 else False \n```
[]