code is running fine on ide && eclipse while failing to run on online
Dictionary Order(larger)
@RULEREMPIRES read this line carefully
prints all the words possible by rearranging the characters of this string which are in dictionary order larger than the given string.
Now here is your corrected code, i have commented where i have made the change.
If your query is clear, then close this doubt by marking it resolved and rate full bro!