WAP where input is "abc" then all possible combinations like bca cab need to be printed.
Sigiloso
As max possible combinations can be n! so I took an array to that size of type string. another array was needed to store original string characters. I swapped original string character array using its index no. at every combination I checked for Its presence in string Array if present then discarded otherwise added.