python -- O(N)
\ndef btreeGameWinningMove(self, root, n, x):\n        """\n        :type root: TreeNode\n        :type n: int\n        :type x: int\n        :rtype: bool\n    
```\ndef btreeGameWinningMove(self, root, n, x):\n        """\n        :type root: TreeNode\n        :type n: int\n        :type x: int\n        :rtype: bool\n        """\n        self.l, self.r = None, None\n        def numNodes(root, x):\n            if not root:\n                return 0 \n            l = numNodes(root.left, x)\n            r = numNodes(root.right, x)\n            if root.val ==x:\n                self.l = l\n                self.r = r\n            return l+r+1\n        numNodes(root,x)\n        return max(self.l, self.r, n-self.l-self.r-1)>n/2\n```
[]