Level Order Traversal Of Binary Tree
Intuition, approach, and complexity discussed in video solution in detail.\nhttps://youtu.be/vSG6Gc8h5IM\n\n# Code\nC++\n\nclass Solution {\npublic:\n    int fi
# Intuition, approach, and complexity discussed in video solution in detail.\nhttps://youtu.be/vSG6Gc8h5IM\n\n# Code\nC++\n```\nclass Solution {\npublic:\n    int findBottomLeftValue(TreeNode* root) {\n        queue<TreeNode*> levelQue;\n        levelQue.push(root);\n        int leftNodeVal = root->val;\n        while(!levelQue.empty()){\n            int currLevelSize = levelQue.size();\n            int orgSize = currLevelSize;\n            while(currLevelSize-->0){\n                TreeNode * currNode = levelQue.front();\n                levelQue.pop();\n                if(orgSize-1 == currLevelSize)\n                    leftNodeVal = currNode->val;\n                if(currNode->left != NULL)levelQue.push(currNode->left);\n                if(currNode->right != NULL)levelQue.push(currNode->right);\n            }\n        }   \n        return leftNodeVal;\n    }\n};\n```\nJava\n```\nclass Solution {\n    public int findBottomLeftValue(TreeNode root) {\n        Deque<TreeNode> levelQue = new ArrayDeque<>();\n        levelQue.offerLast(root);\n        int leftNodeVal = root.val;\n        while(!levelQue.isEmpty()){\n            int currLevelSize = levelQue.size();\n            int orgSize = currLevelSize;\n            while(currLevelSize-->0){\n                TreeNode currNode = levelQue.pollFirst();\n                if(orgSize-1 == currLevelSize)\n                    leftNodeVal = currNode.val;\n                if(currNode.left != null)levelQue.offerLast(currNode.left);\n                if(currNode.right != null)levelQue.offerLast(currNode.right);\n            }\n        }   \n        return leftNodeVal;\n    }\n}\n```
['Breadth-First Search', 'Binary Tree', 'C++', 'Java']