Want to solve this problem? Login now to get access to solve the problems

Problem

Submissions

Solution

Leaderboard

Coming soon

5

Difficulty: EASY

Avg. time to solve

30 min

Success Rate

80%

Problem Statement

Suggest Edit

```
The input string may contain the same characters, so there will also be the same permutations.
The order of permutations doesn’t matter.
```

```
The only input line contains a string S of alphabets in lower case characters.
```

```
Print each permutation in a new line
```

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

```
0<=|S|<=8
where |S| denotes the length of string S.
Time Limit: 1 sec
```

```
cba
```

```
abc
acb
bac
bca
cab
cba
```

```
xyx
```

```
xyx
xxy
yxx
yxx
xyx
xxy
```

Want to solve this problem? Login now to get access to solve the problems