Given a binary tree, find the leftmost value in the last row of the tree.
Example
No.1
Input:
1 | 2 |
Output:
1
No.2
Input:
1 | 1 |
Output:
7
Note
You may assume the tree (i.e., the given root node) is not NULL.
Code
1 | public class TreeNode { |
1 | public int findBottomLeftValue(TreeNode root) { |