C++ dfs
\nclass Solution {\npublic:\n    int parent = 0;\n    int left = 0;\n    int right = 0;\n    \n    int traverse(TreeNode* root, int x)\n    {\n        if(root)\
```\nclass Solution {\npublic:\n    int parent = 0;\n    int left = 0;\n    int right = 0;\n    \n    int traverse(TreeNode* root, int x)\n    {\n        if(root)\n        {\n            int l = traverse(root->left, x);\n            int r = traverse(root->right, x);\n            \n            if(root->val == x)\n                left = l, right = r;\n            \n            return 1 + l + r;\n        }\n        return 0;\n    }\n    \n    bool btreeGameWinningMove(TreeNode* root, int n, int x) \n    {\n        traverse(root, x);\n        parent = n - left - right - 1;\n        return left > (parent + right) || right > (parent + left)  || parent > (left + right);\n    }\n};\n```
[]