
递归
Goofiness
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[LeetCode]Maximum Depth of N-ary Tree@Python
Maximum Depth of N-ary Tree Given 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 · 197 阅读 · 0 评论 -
[LeetCode]Merge Two Binary Trees@Python
Merge Two Binary Trees Given 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 · 141 阅读 · 0 评论 -
[LeetCode]Fibonacci Number@Python
Fibonacci Number The 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 · 348 阅读 · 0 评论 -
[LeetCode]Binary Tree Preorder Traversal@Python
Binary Tree Preorder Traversal Given a binary tree, return the preorder traversal of its nodes’ values. Example Input: [1,null,2,3] Output: [1,2,3] Solution # Recursively class Solution: def p...原创 2019-05-27 22:09:42 · 189 阅读 · 0 评论 -
[LeetCode]Binary Tree Postorder Traversale@Python
Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes’ values. Example Input: [1,null,2,3] Output: [3,2,1] Solution #Recursively class Solution: def ...原创 2019-05-28 23:34:21 · 105 阅读 · 0 评论