Find Bottom Left Tree Value
https://leetcode.com/problems/find-bottom-left-tree-value/description/
Given a binary tree, find the leftmost value in the last row of the tree.
Thoughts
要找最后一层最左的元素,那按层遍历到最后一层即可。
Code
Analysis
时间复杂度O(n).
Last updated
Was this helpful?