only one test case fail.
any test cases for which my code fail anyone figure out please.
Recursion-dictionary order(larger)
use STL next permutation to make all permutations
and then print them in mlexicogrraphical maner
even next permutation will fail for one test case.
same test case as above code.
#include<bits/stdc++.h>
using namespace std;
int main(){
cin>>str;
///solve(0, 1, str);
while(next_permutation(str.begin(), str.end())){
cout<<str<<endl;
}
return 0;
}
hey ! there, i am still waiting your response please help me.
first sort the string and then use next permutation
this is not working for perfectly.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.