摘要:
【LeetCode】Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path fro... 阅读全文
摘要:
在Path SUm 1中(http://www.cnblogs.com/hitkb/p/4242822.html)我们采用栈的形式保存路径,每当找到符合的叶子节点,就将栈内元素输出。注意存在多条路径的情况。 public List> pathSum(TreeNode root, int sum) {... 阅读全文