Skip to content

Commit 13eaace

Browse files
committed
# 400 Solution as on 20-03-2022 08:36 pm
1 parent 8bd6e44 commit 13eaace

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

0047. Permutations II.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// 47.✅ Permutations II
2+
3+
class Solution
4+
{
5+
public:
6+
vector<vector<int>> permuteUnique(vector<int> &nums)
7+
{
8+
9+
vector<vector<int>> v;
10+
sort(nums.begin(), nums.end());
11+
12+
do
13+
{
14+
v.push_back(nums);
15+
} while (next_permutation(nums.begin(), nums.end()));
16+
17+
return v;
18+
}
19+
};

0 commit comments

Comments
 (0)