Simple Intuitive Solution || C++ using Pair
Code\n\nclass Solution {\npublic:\n    void solve(TreeNode* root, int depth, pair<int, int>& pr) {\n        if(!root) return;\n        if(pr.second < depth) pr.
# Code\n```\nclass Solution {\npublic:\n    void solve(TreeNode* root, int depth, pair<int, int>& pr) {\n        if(!root) return;\n        if(pr.second < depth) pr.first = root->val, pr.second = depth;\n        solve(root->left, depth+1, pr);\n        solve(root->right, depth+1, pr);\n    }\n\n    int findBottomLeftValue(TreeNode* root) {\n        pair<int, int> pr = {root->val, 0};\n        solve(root, 0, pr);\n        return pr.first;\n    }\n};\n```
['C++']