![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BFS
hling_so
这个作者很懒,什么都没留下…
展开
-
310. Minimum Height Trees
Minimum Height Trees原创 2017-10-08 20:07:55 · 152 阅读 · 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 3Output: 1 Example 2: Input: 1 / \ 2 3 / / \4 5 6 / 7Output: 7 N原创 2017-12-25 19:14:39 · 155 阅读 · 0 评论 -
515. Find Largest Value in Each Tree Row
题目You need to find the largest value in each row of a binary tree.Example: Input: 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3, 9]题意分析实现/**/** * Definition for a binary tree no原创 2017-12-25 19:22:23 · 128 阅读 · 0 评论 -
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.题意分析实现/** * Definition for a binary tree原创 2017-12-25 19:26:15 · 145 阅读 · 0 评论 -
127. Word Ladder
题目Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that:Only one letter can be changed at a ti原创 2017-12-25 19:53:24 · 169 阅读 · 0 评论