
Breadth-first Search
konsy_dong
Java,C++,Python,linux
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 111. Minimum Depth of Binary Tree
题目: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.思路: 找出最小深度,最小深度是叶节点到根节点的最短路径,如果根节点没有叶原创 2017-04-09 11:22:11 · 262 阅读 · 0 评论 -
LeetCode 637. Average of Levels in Binary Tree
题目: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Input: 3 / \ 9 20 / \ 15 7 Output: [3, 14.5, ...原创 2018-04-07 00:37:27 · 247 阅读 · 0 评论