Skip to content

Commit b357c09

Browse files
authored
Create permutation-nos.md
1 parent 22713d2 commit b357c09

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

problems/permutation-nos.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.
2+
3+
4+
5+
Example 1:
6+
```
7+
Input: nums = [1,1,2]
8+
Output:
9+
[[1,1,2],
10+
[1,2,1],
11+
[2,1,1]]
12+
```
13+
Example 2:
14+
```
15+
Input: nums = [1,2,3]
16+
Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
17+
```
18+
19+
Constraints:
20+
```
21+
1 <= nums.length <= 8
22+
-10 <= nums[i] <= 10
23+
```

0 commit comments

Comments
 (0)