Simple Python, Easy to understand
The node selected by the first person divides the tree by three parts: left, right, parent. We can only choose one region.\n\nclass Solution:\n    def btreeGame
The node selected by the first person divides the tree by three parts: left, right, parent. We can only choose one region.\n```\nclass Solution:\n    def btreeGameWinningMove(self, root: TreeNode, n: int, x: int) -> bool:\n        self.loc = None\n        def dfs(node):\n            if not node:\n                return\n            if node.val == x:\n                self.loc = node\n                return\n            else:\n                dfs(node.left)\n                dfs(node.right)\n        dfs(root)\n        self.l = 0\n        self.r = 0\n        def cnt_l(node):\n            if node:\n                self.l += 1\n                cnt_l(node.left)\n                cnt_l(node.right)\n        def cnt_r(node):\n            if node:\n                self.r += 1\n                cnt_r(node.left)\n                cnt_r(node.right)\n        cnt_l(self.loc.left)\n        cnt_r(self.loc.right)\n        t = n - 1 -self.l - self.r\n        return max(t,max(self.l,self.r)) > n/2\n```
[]