Recursion dictionary order larger 2 test case failing

I am permutating all the characters of the given string and comparin gthem will original string. If the string generated is gretaer th en printing else nothing.
Th ecode passe d2 test cases and failed 2


@saurabh2 @jaiskid

@piyush.bansal8158625 hey piyush rather than doing strcmp you have to make a custom function

what should be the output of abc

if its
acb
bac
bca
cba
cab

then the strcmp is doing same.
how is strcmp doing something different.I just need to check whether inp>original passed


still not working
Pleas elook

@piyush.bansal8158625 comment line no 31

@jaiskid @saurabh2
why i dont need to backtrack as without it permutations will generate copies and skip some ons… if not please explain with a sample example.
The codes run well and got submitted even.
The 2 questions I have is what is the difference my custom compare function created as compared to strcmp
and 2nd question is why I don’t need backtracking as while permutating the original strings gets lost due to swap function.