```
class Solution(object):
def findBottomLeftValue(self, root):
"""
:type root: TreeNode
:rtype: int
"""
stack = [root]
while len(stack) != 0:
temp = []
lm = stack[0].val
while len(stack) != 0:
node = stack.pop()
if node.right is not None:
temp.append(node.right)
if node.left is not None:
temp.append(node.left)
if len(temp) == 0:
return lm
stack = temp[::-1]
```