Question d’entretien chez Microsoft

implement a function thet gets a string ans prints all string permutetions

Réponses aux questions d'entretien

Utilisateur anonyme

27 août 2016

did the code above

Utilisateur anonyme

29 sept. 2017

Static stringbuilder out = new stringbuilder StringPer(string str,int position) { For (int i=position; i

1

Utilisateur anonyme

27 août 2016

int FindPermutations( char * String, int StartIndex ) { int i, j; int retVal = 0; int strLength = strlen(String); printf("%s\n", String); for (i = 0; i < strLength; ++i) { for (j = StartIndex; j < strLength; ++j) { if ( j <= i) { continue; } Swap(&(String[i]), &(String[j])); retVal = FindPermutations(String, j+1); Swap(&(String[j]), &(String[i])); } } return retVal; }