C++  solution 100% better   Using Recursion
class Solution {\npublic:\n\n    int total_descent(TreeNode root)\n    {\n    \n        if(root==NULL)\n        {\n            return 0;\n        }\n        els
class Solution {\npublic:\n\n    int total_descent(TreeNode* root)\n    {\n    \n        if(root==NULL)\n        {\n            return 0;\n        }\n        else if(root->left==NULL&&root->right==NULL)\n        {\n            return 1;\n        }\n        else\n        {\n            int ans=0;\n            ans+=total_descent(root->left);\n            ans+=total_descent(root->right);\n            return ans+1;\n        }\n        \n        \n        \n    }\n    \n    bool findx(TreeNode* root,int n,int x)\n    {\n        if(root==NULL)\n        {\n            return false;\n        }\n        if(root->val==x)\n        {\n            \n            \n            int l=total_descent(root->left);\n            int r=total_descent(root->right);\n            int u=n-l-r-1;\n            \n            if((l<(u+r+1))&&(r<(u+l+1)&&(u<l+r+1)))\n            {\n                return false;\n            }\n            else\n            {\n                return true;\n            }\n               \n        }     \n        else\n        {\n            \n            bool l=findx(root->left,n,x);\n            bool r=findx(root->right,n,x);\n            return l||r;        \n        }\n    }\n               \n    bool btreeGameWinningMove(TreeNode* root, int n, int x) \n    {\n        \n        if(root->val==x)\n        {\n            int l=total_descent(root->left);\n            int r=total_descent(root->right);\n            \n            if(l==r)\n            {\n                return false;\n            }\n            else{\n                return true;\n            }\n        }\n      \n      return findx(root,n,x);\n        \n    }\n                      \n};
[]