摘要: Given an integer array, your task is to find all the different possible increasing subsequences of the given array, and the length of an increasing su 阅读全文
posted @ 2018-12-06 19:00 fatttcat 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be 阅读全文
posted @ 2018-12-06 18:40 fatttcat 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2018-12-06 17:42 fatttcat 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文
posted @ 2018-12-06 17:24 fatttcat 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: backtracking 和permutations不同的是可以有重复元素。先 阅读全文
posted @ 2018-12-06 17:05 fatttcat 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Given a collection of distinct integers, return all possible permutations. Example: backtracking 为了防止值重复,用visited数组标记该元素在每一层递归的时候是否被访问过,注意递归到最底层pop元素回 阅读全文
posted @ 2018-12-06 16:56 fatttcat 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
posted @ 2018-12-06 14:16 fatttcat 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Exampl 阅读全文
posted @ 2018-12-06 14:00 fatttcat 阅读(124) 评论(0) 推荐(0) 编辑