Recursion- Dictionary Order(Larger)

i am trying to approach this question like finding all the permutation of the string and then sort the array.
find the particular given input string in the array and all the elements after that has to be printed.

Let me know if this correct or we can do it in a better way?

this is correct

you can also use next_permutation()

Next Permutation
https://www.cplusplus.com/reference/algorithm/next_permutation/

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.