I want to print all permutation of string in lexicographic order. I wrote this code:
void permute(char *a, int i, int n) { if (i == (n-1)) printf(\"\\\"%s
void permute(string str,int index) { if(index == str.size()) { cout<>str; sort(str.begin(),str.end()); permute(str,0); cout<