DFS
徐不依
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
78. Subset && 90.Subset 2 (Array, DFS)
##### 78. Subsets 求不含重复数字的数组的子集Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: num...原创 2019-01-06 00:35:26 · 257 阅读 · 0 评论 -
46 Permutations && 47 Permutation II (Array, DFS)
78 Permutation IGiven a collection of numbers, return all possible permutations.For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].和上次...原创 2019-01-06 22:37:00 · 187 阅读 · 0 评论 -
39. Combination Sum 40 Combination Sum 2(Array, DFS)
39. Combination SumGiven a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to tar...原创 2019-01-07 21:56:02 · 199 阅读 · 0 评论 -
22. Generate Parentheses (DFS, String)
22. Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()()...原创 2019-01-07 23:06:24 · 166 阅读 · 0 评论 -
17. Letter Combinations of a Phone Number (DFS, String)
17. Letter Combinations of a Phone NumberGiven a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.A mapping of digit to letters ...原创 2019-01-08 10:25:31 · 176 阅读 · 0 评论 -
93. Restore IP Addresses (DFS, String)
Given a string containing only digits, restore it by returning all possible valid IP address combinations.Example:Input: "25525511135"Output: ["255.255.11.135", "255.255.111.35"]思路:合法性的规则:...原创 2019-01-08 15:11:01 · 154 阅读 · 0 评论
分享