New update is available. Click here to update.

Posted: 15 Jan, 2021

Difficulty: Easy

```
1. There might be duplicates present in the array.
2. The order of the permutations in the output does not matter.
3. Do not use any kind of in-built library functions to find the answer.
```

```
The first line contains the integer N, denoting the size of the array.
The second line contains N space-separated integers denoting the array elements.
```

```
The output contains K lines, where each line contains N space-separated integers denoting one of the unique permutations of the given array.
Output for each test case must be in a separate line.
```

```
You do not need to print anything, it has already been taken care of. Just implement the given function.
```

```
1 <= N <= 6
Time Limit: 1 sec
```

SIMILAR PROBLEMS

Prime Digit Sum

Posted: 17 Apr, 2022

Difficulty: Hard

Prime Digit Sum

Posted: 17 Apr, 2022

Difficulty: Hard

Mario And His Princess

Posted: 12 May, 2022

Difficulty: Moderate

Combination Sum III

Posted: 25 May, 2022

Difficulty: Moderate

Combination Sum III

Posted: 25 May, 2022

Difficulty: Moderate

Generate All Strings

Posted: 9 Jul, 2022

Difficulty: Moderate

8-Queen Problem

Posted: 19 Dec, 2022

Difficulty: Easy

Categories:

Popular Courses: