Java BFS using Queue with explanation
Complexity O(n)\n\nTraverse the tree using a Queue (FIFO) by adding the right node to the queue first then the left node. \nThe last node to be popped will be t
Complexity `O(n)`\n\nTraverse the tree using a Queue (FIFO) by adding the **right node to the queue first then the left node**. \nThe last node to be popped will be the left most node.\n```\nclass Solution {\n    public int findBottomLeftValue(TreeNode root) {\n        \n        Queue<TreeNode> queue = new LinkedList<>();\n        \n        queue.add(root);\n        TreeNode node = new TreeNode();\n        \n        while(!queue.isEmpty()){\n            node = queue.poll();\n            if(node.right!=null) queue.add(node.right);\n            if(node.left!=null) queue.add(node.left);\n        }\n        \n        return node.val;\n        \n    }\n    \n}\n```
[]