Simple Clean Java Solution
Short explanation:\n\nWhen you find the selected node, there are three different paths you can block: left right parent In order to guarantee your win, one of t
**Short explanation:**\n\nWhen you find the selected node, there are three different paths you can block: `left` `right` `parent` In order to guarantee your win, one of those paths should include more nodes than the sum of other two paths. \n\n.\n\n```java\npublic boolean btreeGameWinningMove(TreeNode root, int n, int x) {\n\tif(root == null) return false;\n\n\tif(root.val == x){\n\t\tint left = count(root.left);\n\t\tint right = count(root.right);\n\t\tint parent = n - (left+right+1);\n\n\t\treturn parent > (left + right) || left > (parent + right) || right > (left + parent);\n\t}\n\n\treturn btreeGameWinningMove(root.left, n, x) || btreeGameWinningMove(root.right, n, x);\n}\n\nprivate int count(TreeNode node){\n\tif(node == null) return 0;\n\treturn count(node.left) + count(node.right) + 1;\n}\n```
['Java']