Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
luzhipeng committed May 1, 2019
1 parent 2f9b3bb commit a951ec6
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 95 deletions.
21 changes: 11 additions & 10 deletions problems/40.combination-sum-ii.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
## 题目地址
https://leetcode.com/problems/combination-sum/description/
https://leetcode.com/problems/combination-sum-ii/description/

## 题目描述
```
Given 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 target.
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.
The same repeated number may be chosen from candidates unlimited number of times.
Each number in candidates may only be used once in the combination.
Note:
All numbers (including target) will be positive integers.
The solution set must not contain duplicate combinations.
Example 1:
Input: candidates = [2,3,6,7], target = 7,
Input: candidates = [10,1,2,7,6,1,5], target = 8,
A solution set is:
[
[7],
[2,2,3]
[1, 7],
[1, 2, 5],
[2, 6],
[1, 1, 6]
]
Example 2:
Input: candidates = [2,3,5], target = 8,
Input: candidates = [2,5,2,1,2], target = 5,
A solution set is:
[
[2,2,2,2],
[2,3,3],
[3,5]
[1,2,2],
[5]
]
```
Expand Down
33 changes: 11 additions & 22 deletions problems/46.permutations.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
## 题目地址
https://leetcode.com/problems/combination-sum/description/
https://leetcode.com/problems/permutations/description/

## 题目描述
```
Given 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 target.
Given a collection of distinct integers, return all possible permutations.
The same repeated number may be chosen from candidates unlimited number of times.
Example:
Note:
All numbers (including target) will be positive integers.
The solution set must not contain duplicate combinations.
Example 1:
Input: candidates = [2,3,6,7], target = 7,
A solution set is:
[
[7],
[2,2,3]
]
Example 2:
Input: candidates = [2,3,5], target = 8,
A solution set is:
Input: [1,2,3]
Output:
[
[2,2,2,2],
[2,3,3],
[3,5]
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
```
Expand Down
30 changes: 8 additions & 22 deletions problems/47.permutations-ii.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
## 题目地址
https://leetcode.com/problems/combination-sum/description/
https://leetcode.com/problems/permutations-ii/description/

## 题目描述
```
Given 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 target.
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
The same repeated number may be chosen from candidates unlimited number of times.
Example:
Note:
All numbers (including target) will be positive integers.
The solution set must not contain duplicate combinations.
Example 1:
Input: candidates = [2,3,6,7], target = 7,
A solution set is:
[
[7],
[2,2,3]
]
Example 2:
Input: candidates = [2,3,5], target = 8,
A solution set is:
Input: [1,1,2]
Output:
[
[2,2,2,2],
[2,3,3],
[3,5]
[1,1,2],
[1,2,1],
[2,1,1]
]
```
Expand Down
34 changes: 14 additions & 20 deletions problems/78.subsets.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@

## 题目地址
https://leetcode.com/problems/combination-sum/description/
https://leetcode.com/problems/subsets/description/

## 题目描述
```
Given 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 target.
Given a set of distinct integers, nums, return all possible subsets (the power set).
The same repeated number may be chosen from candidates unlimited number of times.
Note: The solution set must not contain duplicate subsets.
Note:
Example:
All numbers (including target) will be positive integers.
The solution set must not contain duplicate combinations.
Example 1:
Input: candidates = [2,3,6,7], target = 7,
A solution set is:
Input: nums = [1,2,3]
Output:
[
[7],
[2,2,3]
[3],
[1],
[2],
[1,2,3],
[1,3],
[2,3],
[1,2],
[]
]
Example 2:
Input: candidates = [2,3,5], target = 8,
A solution set is:
[
[2,2,2,2],
[2,3,3],
[3,5]
]
```

Expand Down
33 changes: 12 additions & 21 deletions problems/90.subsets-ii.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@

## 题目地址
https://leetcode.com/problems/combination-sum/description/
https://leetcode.com/problems/subsets-ii/description/

## 题目描述
```
Given 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 target.
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set).
The same repeated number may be chosen from candidates unlimited number of times.
Note: The solution set must not contain duplicate subsets.
Note:
Example:
All numbers (including target) will be positive integers.
The solution set must not contain duplicate combinations.
Example 1:
Input: candidates = [2,3,6,7], target = 7,
A solution set is:
[
[7],
[2,2,3]
]
Example 2:
Input: candidates = [2,3,5], target = 8,
A solution set is:
Input: [1,2,2]
Output:
[
[2,2,2,2],
[2,3,3],
[3,5]
[2],
[1],
[1,2,2],
[2,2],
[1,2],
[]
]
```
Expand Down

0 comments on commit a951ec6

Please sign in to comment.