Re: [algogeeks] Permutation of a string

2011-04-08 Thread Manish Pathak
#include #include #include int fact(int n); void main() { char a[20],st_char; static int i,j,k,n,ctr,main_ctr; printf("Enter the string : "); //gets(a); scanf("%s",a); n=strlen(a); if(n<=1) { printf("please enter a valid string "); exit(0); } //label : while(main_ctrDesigned by Manish Pa

[algogeeks] Permutation of a string

2011-04-08 Thread Subhransu
What could be the efficient algo for finding permutation of string. Lets say a user enter a string "abc". The output should be 6(3*2*1) along with he combination of them like abc bca cab bac acb cba *Subhransu Panigrahi * *Mobile:* *+91-9840931538* *Email:* subhransu.panigr...