Java simple solution beats 100% time & space with explanation
\nclass Solution {\n    private int left, right, val;\n    public boolean btreeGameWinningMove(TreeNode root, int n, int x) {\n        val = x; left =0; right =
```\nclass Solution {\n    private int left, right, val;\n    public boolean btreeGameWinningMove(TreeNode root, int n, int x) {\n        val = x; left =0; right = 0;\n        count(root);\n        return left > n/2 || right > n/2 || (left + right +1) < (n+1)/2;\n    }\n    \n    private int count(TreeNode root){\n        if(root == null) return 0;\n        int l = count(root.left);\n        int r = count(root.right);\n        if(root.val == val){\n            left = l;\n            right = r;\n        }\n        return l + r +1;\n    }\n}\n\n/*\ncountLeft, countRight of x\n\nif(countLeft or countRight > n/2) return true. Because we choose one of child whose count > n/2\nif(countLeft + countRight +1 < n/2) return true. Because we choose parent of x\n\nother return false;\n\n*/\n```
[]