View Single Post
Old Jan 18th, 2008, 11:27 PM   #5
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: Recursive permutation of string

Quote:
Originally Posted by Sane View Post
You're not just trying to permutate a string, right...?
Actually, yes, I am

My approach makes sense to me, logically anyway. I take the string, swap each character into the low index, and repeat on the next piece of the string for each of these (low+1). I can see why each permutation gets printed multiple times but can't think of how to prevent this.

I'm just looking for a suggestion on how to get it working.

EDIT: I just looked at my first post and it says "reverse a character array" rather than "permute a character array".
titaniumdecoy is offline   Reply With Quote