Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azl397985856/leetcode
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ownrepository/leetcode
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

There isn’t anything to compare.

azl397985856:master and ownrepository:master are entirely different commit histories.

Showing with 56 additions and 95 deletions.
  1. +11 −10 problems/40.combination-sum-ii.md
  2. +11 −22 problems/46.permutations.md
  3. +8 −22 problems/47.permutations-ii.md
  4. +14 −20 problems/78.subsets.md
  5. +12 −21 problems/90.subsets-ii.md
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]
]
```
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]
]
```
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]
]
```
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]
]
```

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],
[]
]
```