I want to generate all possible permutations of a given string in C++.
I read this discussion here on StackOverflow only: How to generate all permutations of an array in sorted order?
The answer's fine but once I get moving to say a string of 12-14 characters the program takes considerable amount of time.
Is there a better way to solve this such that it doesn't take more than a few seconds?
Given I have a string of say 10 characters.