[Java] Super easy | 100% & 99%
\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode() {}\n
```\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode() {}\n *     TreeNode(int val) { this.val = val; }\n *     TreeNode(int val, TreeNode left, TreeNode right) {\n *         this.val = val;\n *         this.left = left;\n *         this.right = right;\n *     }\n * }\n */\nclass Solution {\n    public TreeNode subtreeWithAllDeepest(TreeNode root) {\n        if(root == null)\n            return null;\n        \n        if(checkHeight(root.left) == checkHeight(root.right))\n            return root;\n        else if(checkHeight(root.left) > checkHeight(root.right))\n            return subtreeWithAllDeepest(root.left);\n        else\n            return subtreeWithAllDeepest(root.right);    \n    }\n    \n    private int checkHeight(TreeNode root){\n        if(root == null) return 0;\n        int res = Math.max(checkHeight(root.left), checkHeight(root.right))+1;\n        return res;\n    }\n}\n```
['Java']