递归
Goofiness
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[LeetCode]Maximum Depth of N-ary Tree@Python
Maximum Depth of N-ary TreeGiven a n-ary 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.Solution""...原创 2019-04-25 21:11:05 · 213 阅读 · 0 评论 -
[LeetCode]Merge Two Binary Trees@Python
Merge Two Binary TreesGiven two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them...原创 2019-04-19 16:30:50 · 151 阅读 · 0 评论 -
[LeetCode]Fibonacci Number@Python
Fibonacci NumberThe Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That i...原创 2019-04-24 16:22:04 · 365 阅读 · 0 评论 -
[LeetCode]Binary Tree Preorder Traversal@Python
Binary Tree Preorder TraversalGiven a binary tree, return the preorder traversal of its nodes’ values.ExampleInput: [1,null,2,3]Output: [1,2,3]Solution# Recursivelyclass Solution: def p...原创 2019-05-27 22:09:42 · 197 阅读 · 0 评论 -
[LeetCode]Binary Tree Postorder Traversale@Python
Binary Tree Postorder TraversalGiven a binary tree, return the postorder traversal of its nodes’ values.ExampleInput: [1,null,2,3]Output: [3,2,1]Solution#Recursivelyclass Solution: def ...原创 2019-05-28 23:34:21 · 125 阅读 · 0 评论
分享