Best O(N) Solution
Approach\nLevel Order Traversal (Reverse)\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(n)\n\n# Code\n\n/**\n * Definition for a binary tr
# Approach\nLevel Order Traversal (Reverse)\n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(n)$$\n\n# Code\n```\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 findBottomLeftValue(TreeNode* root) {\n        queue <TreeNode*> q;\n        q.push(root);\n        TreeNode* node;\n        while (!q.empty()) {\n            node = q.front();\n            q.pop();\n            if (node->right) \n                q.push(node->right);\n            if (node->left) \n                q.push(node->left);\n        }\n        return node->val;\n    }\n};\n```
['C++']