All test case fail recursion optimal order greater

hello @Vikaspal
sort ur input string, to print all valid strings in lexicographical order

@aman212yadav means if cab --> abc then always the last string is going to greater in that case

store ur input string in some variable,
then sort that variable and then do all ur operations on that variable.

for comparision use ur original input string

@aman212yadav in first case i thought i need to print only one greatest string but here i need to display all the greater string w.r.t to the current input.


I m doing in this way but again the test case fails

@aman212yadav here the output is sorted i think but nothing works well

chekc this ,u were not sorting str.

@aman212yadav why we are sorting at initial stage we are getting the same output. I don’t understand this.

yeah output will be same, but their ordering will be different,

and to pass test cases order should be lexicographical
and to get lexicographical order we r sorting our string

Ordering means here??bhai abhi kuch samaj nhi aaya ki kya differene hai dono main

got it means like in dicitonary :
wihout sort
acb
abc
bca
bac
with sort
abc
acb
bac
bca
right?

right . . . . … . . . . . . . . . .

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.