![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BST
文章平均质量分 54
back-to-back
忙忙碌碌终日,终于一事无成。
展开
-
LeetCode 之 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. BST中深度的问题,我们可以递归(DFS),也可以迭代解决(BFS)原创 2015-11-30 22:20:58 · 202 阅读 · 0 评论 -
LeetCode 之 Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3]. Note: Recursive soluti原创 2016-01-22 14:45:59 · 360 阅读 · 0 评论 -
LeetCode 之 Binary Tree Paths
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1->2->5", "1->3"] 又是较原创 2015-12-06 15:55:21 · 373 阅读 · 0 评论 -
LeetCode 之 Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For example: Given the following binary tree, 1原创 2016-04-10 22:23:39 · 379 阅读 · 0 评论