Re:
a simple program to find out the permutations of all the letters in the word ex: abc gives abc acb bac bca cba cab[code]void swap(char *p,char *q){ char c; c=*p; *p=*q; *q=c; } void perm(char *a,int m,int n) { if(m==n){ for(int i=0;i<=n;i++) cout<<a[i]; } else { for(int j=n;j<=m;j++) { swap(a[j],a[n]); … |
|
A simple program to calculate permutations of a string using recursion, I have used a malloc string of size 100 , you can change it to whatever value you want. The author is currently working at Microsoft,any questions can be directed to [email snipped] |
|
This program was written and tested in unix/linux environment (in EMacs editor )with a GCC compiler. |
|
the code now contains snippet to create the linked list too! any questions can be directed to [U]raghu_tillu@hotmail.com[/U] |
|
Re:
Hello to everyone out there. Recently many people on different forums have been asking how to make a recursive function which reverses the string passed to it. But unlike the normal recrusive funtion which only prints out the reversed string, this implementation returns a pointer to reversed string. |
|
A simple program to calculate combinations of a string using recursion, I have used a malloc string of size 100 , you can change it to whatever value you want. The author is currently working at Microsoft. for eg if input string is abcd and you want all 3 letter … |
|
Regular expression pattern match in a string, I only checked with * as wild card, other wild card characters are easy implement but I havent done that. any problems you can email me @ [email]rramaswa@usc.edu[/email] platform - Unix/Linux, havent tested in windows, should'nt be a problem unless some standard header … |
Joined
Last Seen
0 Reputation Points
0 Endorsements
Ranked #16.0K