Print All Permutations Of A String Iteratively
easy
1. You are given a string. 2. You have to print all permutations of the given string iteratively.
Constraints
1 <= length of string <= 15
Format
Input
A String
Output
All permutations of the given string(one in a line).
Example
Sample Input
abc
Sample Output
abc
bac
cab
acb
bca
cba
Question Video