#include<stdio.h>
void Permutation(char* pStr,char* begin){
if(*begin=='\0')
printf("%s\n",pStr);
else{
for(char* ch=begin;*ch!='\0';ch++){
char temp=*begin;
*begin=*ch;
*ch=temp;
Permutation(pStr,begin+1);
temp=*begin;
*begin=*ch;
*ch=temp;
}
}
}
void Permutation(char* pStr){
if(pStr==NULL)
return;
Permutation(pStr,pStr);
}
StringPermutation
最新推荐文章于 2022-09-23 20:02:23 发布