Java - Easy solution by comparing Depth - with comments
\nclass Solution {\n    public TreeNode subtreeWithAllDeepest(TreeNode root) {\n        if (root == null) {\n            return null;\n        }\n        int le
```\nclass Solution {\n    public TreeNode subtreeWithAllDeepest(TreeNode root) {\n        if (root == null) {\n            return null;\n        }\n        int leftDepth = getDepth(root.left);  // get depth of left\n        int rightDepth = getDepth(root.right); // get depth of right\n        if (leftDepth == rightDepth) {\n            return root;    // You got it!\n        } else {\n            // Go with the deepest side \n            if(leftDepth > rightDepth){\n                return subtreeWithAllDeepest(root.left);\n            } else {\n                return subtreeWithAllDeepest(root.right);\n            }\n        }\n    }\n    \n    // Method to get depth of tree at any node.\n    public int getDepth (TreeNode node) {\n        if (node == null) {\n            return 0;\n        }\n        return 1 + Math.max(getDepth(node.left), getDepth(node.right)); \n    }\n}\n```
['Depth-First Search', 'Java']