|
Re: Recursive permutation of string
I am having trouble understanding how your code works but I will figure it out eventually. How does its runtime compare to mine? (Thanks, by the way.)
I really should have specified this in the beginning, but the (Java) method signature is supposed to be
void permute(char[] str, int low, int high).
Is it possible to accomplish this without copying the string on each iteration of the loop?
|