class Solution {
public int findBottomLeftValue(TreeNode root) {
int ret=0;
Queue<TreeNode> queue=new ArrayDeque<TreeNode>();
queue.add(root);
while(!queue.isEmpty()){
TreeNode tmp=queue.poll();
if(tmp.right!=null){
queue.offer(tmp.right);
}
if(tmp.left!=null){
queue.offer(tmp.left);
}
ret=tmp.val;
}
return ret;
}
}