Tree, Medium
Question
Given a binary tree, find the leftmost value in the last row of the tree.
Example 1:
|
|
Example 2:
|
|
Note: You may assume the tree (i.e., the given root node) is not NULL.
Answer
|
|
Time complexity: O(n)
Anne.github.io
Given a binary tree, find the leftmost value in the last row of the tree.
Example 1:
|
|
Example 2:
|
|
Note: You may assume the tree (i.e., the given root node) is not NULL.
|
|
Time complexity: O(n)