You are viewing a single comment's thread. Return to all comments →
Thanks but if size of array is large..I think better to start at the end:
for (int i = n-2; i >=0; i--) { if (strcmp(s[i], s[i + 1]) < 0) { k = i; break; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Permutations of Strings
You are viewing a single comment's thread. Return to all comments →
Thanks but if size of array is large..I think better to start at the end: