摘要: 未经博主同意,禁止瞎JB转载。 LeetCode104二叉树的最大深度 https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/description/ 我的解法: 递归: 复杂度分析: 时间复杂度:我们每个结点只访问一次,因此时间 阅读全文
posted @ 2018-10-11 22:42 嬴政有条北冥的鱼 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 未经博主同意,禁止瞎JB转载。 LeetCode88合并两个有序数组 https://leetcode-cn.com/problems/merge-sorted-array/description/ 我的解法: 使用了python里面的insert函数,而且每次插入一个数字都要移动该数字后面所有的数 阅读全文
posted @ 2018-10-11 22:14 嬴政有条北冥的鱼 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 未经博主同意,禁止瞎JB转载。 LeetCode70爬楼梯 https://leetcode-cn.com/problems/climbing-stairs/description/ 斐波那契数列 动态规划 我的解法: 阅读全文
posted @ 2018-10-11 21:16 嬴政有条北冥的鱼 阅读(69) 评论(0) 推荐(0) 编辑