C++ Recursive Easy APproach
\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNode() : val(0)
```\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNode() : val(0), left(nullptr), right(nullptr) {}\n *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n * };\n */\nclass Solution {\npublic:\n    int hei(TreeNode* rt){\n        if(rt==NULL) return 10000;\n        return 1+max(hei(rt->left),hei(rt->right));\n    }\n    TreeNode* subtreeWithAllDeepest(TreeNode* root) {\n        if(root==NULL) return NULL;\n        if(root->left==NULL && root->right==NULL){\n            return root;\n        }\n        if(hei(root->left)==hei(root->right)){\n            return root;\n        }\n        else if(hei(root->left)>hei(root->right)){\n            return subtreeWithAllDeepest(root->left);\n        }\n        else{\n            return subtreeWithAllDeepest(root->right); \n        }\n    }\n};\n```
['Recursion', 'C', 'C++']