
深度搜索
子长
这个作者很懒,什么都没留下…
展开
-
104. Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 回顾一下深度优先和广度优先吧 使用递归的深度优先搜索(一行搞定) str原创 2017-10-06 16:24:53 · 213 阅读 · 0 评论 -
513. Find Bottom Left Tree Value
Given a binary tree, find the leftmost value in the last row of the tree.Example 1: Input: 2 / \ 1 3 Output: 1 Example 2: Input: 1 / \ 2 3 / / \ 4 5 6 / 7 Output: 7 Not原创 2017-10-06 17:03:54 · 226 阅读 · 0 评论