JAVA 100% 100% With explanation
\t//find node in leftSubTree,then in rightSubTree ,then find leftNodeCount\n\t//if max of above 3 is greater than n/2 return true \n\tclass Solution {\n\t\tpubl
\t//find node in leftSubTree,then in rightSubTree ,then find leftNodeCount\n\t//if max of above 3 is greater than n/2 return true \n\tclass Solution {\n\t\tpublic boolean btreeGameWinningMove(TreeNode root, int n, int x) {\n\t\t\tTreeNode node=find(root,x);\n\t\t\tint countLeft=count(node.left);\n\t\t\tint countRight=count(node.right);\n\t\t\tint leftNodeCount=n-countLeft-countRight-1;\n\t\t\tint max=Math.max(leftNodeCount,Math.max(countLeft,countRight));\n\t\t   return max>((n/2))? true:false; \n\t\t}\n\t\t//method to count number of node in a subtree \n\t\tint count(TreeNode node){\n\t\t\t if(node==null)\n\t\t\t\treturn 0;\n\t\t   return 1+count(node.left)+count(node.right); \n\t\t}\n\t\t//method to find node\n\t\tTreeNode find(TreeNode node,int n){\n\t\t\tif(node==null)\n\t\t\t\treturn null;\n\t\t\tif(node.val==n)\n\t\t\t\treturn node;\n\t\t   TreeNode left=find(node.left,n);\n\t\t   TreeNode right=find(node.right,n);\n\t\t\treturn left==null? right:left;\n\t\t}\n\t}
[]