With Explanation Comments:  Time: 15 ms (82.53%), Space: 21.7 MB (82.84%)
Solution1: DFS\n\nTC: O(n)   //iterate all tree nodes\nSC: O(height)   //recursion call stack\nTime: 15 ms (82.53%), Space: 21.7 MB (82.84%)\n\n\'\'\'\nclass So
**Solution1: DFS**\n\nTC: O(n)   //iterate all tree nodes\nSC: O(height)   //recursion call stack\nTime: 15 ms (82.53%), Space: 21.7 MB (82.84%)\n\n\'\'\'\nclass Solution {\npublic:\n    \n    //initialize two variables, one to store the correct node value & one to compare nodes to get the max one\n    int value=0, max=INT_MIN;\n    \n    \n    int findBottomLeftValue(TreeNode* root) {\n        \n        //base case 1\n        if(!root)\n            return -1;\n        \n        //recursively, call the helper function with intial value of level counter=0\n        helper(root, 0);\n        \n        //return the final valid value\n        return value;\n    }\n    \n    void helper(TreeNode* node, int counter){\n         \n        //check if we\'re in the maximum deapth/level in the tree\n        if(counter>max){\n            //if yes-> save the max level until now\n            max=counter;\n            //save the current node value\n            value=node->val;\n        }\n        \n        //if the current node have a left node\n        if(node->left)\n            //recursively, call the helper function with its left nodes, add the level counter by one\n            helper(node->left, counter+1);\n        \n        //if the current node have a right node\n        if(node->right)\n            //recursively, call the helper function with its right nodes, add the level counter by one\n            helper(node->right, counter+1);\n    }\n    \n};\n\'\'\'\n\n**Solution 2: BFS**\n\n\'\'\'\nTC: O(n)   //iterate all tree nodes\nSC: O(height)   //initialize a queue\nTime: 6 ms (98.92%), Space: 21.9 MB (38.14%)\n\n\nclass Solution {\npublic:\n    int findBottomLeftValue(TreeNode* root) {\n        \n        //initialize a queue & add the whole tree in it\n        queue<TreeNode*> q;\n        q.push(root);\n        \n        //loop until the queue gets empty\n        while(!q.empty()){\n            \n            //save the current queue element\'s value\n            root=q.front();\n            //remove the current element\n            q.pop();\n            \n            //if the current node have a right node\n            if(root->right)\n                //add it to the queue\n                q.push(root->right);\n            \n            //if the current node have a left node\n            if(root->left)\n                //add it to the queue\n                q.push(root->left);\n        }\n        \n        //after that, i just need the last node value in the whole tree\n        return root->val;\n    }\n};\n\'\'\'
['Depth-First Search', 'Breadth-First Search', 'Recursion', 'Queue', 'C', 'C++']