摘要: 地址: http://lintcode.com/zh-cn/problem/binary-tree-level-order-traversal/ 借助队列来完成 http://lintcode.com/zh-cn/problem/binary-tree-level-order-traversal-i 阅读全文
posted @ 2018-02-11 11:07 章鱼小年糕 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 地址: http://lintcode.com/zh-cn/problem/subsets/ http://lintcode.com/zh-cn/problem/subsets-ii/ 子集 其实就是一颗子集树 带重复元素的子集 筛选一下分支,排序数组,然后相同的元素只能出现1,...,0...或者 阅读全文
posted @ 2018-02-11 11:04 章鱼小年糕 阅读(154) 评论(0) 推荐(0) 编辑
摘要: lintcode地址: http://lintcode.com/zh-cn/problem/permutations/ http://lintcode.com/zh-cn/problem/permutations-ii/ 全排列,用了子集树的解法: 带重复元素的排列 筛选条件就是在i和t不等的时候, 阅读全文
posted @ 2018-02-11 10:58 章鱼小年糕 阅读(165) 评论(0) 推荐(0) 编辑