standard BFS in java
\n    public int findBottomLeftValue(TreeNode root) {\n        /*any initial value is valid*/\n        int result = -1;\n        ArrayDeque<TreeNode> queue = ne
```\n    public int findBottomLeftValue(TreeNode root) {\n        /*any initial value is valid*/\n        int result = -1;\n        ArrayDeque<TreeNode> queue = new ArrayDeque<>();\n        queue.offer(root);\n        while (!queue.isEmpty()) {\n            result = queue.peek().val;\n            int size = queue.size();\n            for (int i = 0; i < size; i++) {\n                TreeNode treeNode = queue.poll();\n                if (treeNode.left != null) {\n                    queue.offer(treeNode.left);\n                }\n                if (treeNode.right != null) {\n                    queue.offer(treeNode.right);\n                }\n            }\n        }\n        return result;\n    }\n```
[]