All permutations of a given string.

Given a string print out all possible combinations of a given string, in the following ways?

- Recursive
- Non-Recursive
- Print combinations (not permutations). They should be unique and distinct.

All permutations of a given string.

Its a simple backtracking problem. U may call backtrack as recursive solution. Well, i cant remember any iterative way for it. If u use C++ , then u will find a function for all possible permutation in header. the name of the function is next_permutation() . U may try it also. I f u need , i can give u C++ code for all possible permutation and ya combination too...just a little modification. ;)