beats more than 90% of users!!
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n``` javascript []\nfunction orderTr(root, count, res) {\n    if(root == null) return;\n\n    if(root.left == null && root.right == null && count > res[0]) {\n        res[0] = count;\n        res[1] = root.val;\n    }\n\n    orderTr(root.left, count+1, res);\n\n    orderTr(root.right, count+1, res);\n};\nvar findBottomLeftValue = function(root) {\n    let res = [0, 0];\n    orderTr(root, 1, res);\n    return res[1];\n};\n```\n``` cpp []\nclass Solution {\npublic:\n    vector<int> res = {0, 0};\n    void orderTr(TreeNode* root, int count) {\n        if(root == NULL) return;\n\n        if(root->left == NULL && root->right == NULL && count > res[0]) {\n            res[0] = count;\n            res[1] = root->val;\n        }\n\n        orderTr(root->left, count+1);\n        \n        orderTr(root->right, count+1);\n    }\n    int findBottomLeftValue(TreeNode* root) {\n        orderTr(root, 1);\n        cout << res[1];\n        return res[1];\n    }\n};\n```
['C++', 'JavaScript']