Unable to obtain correct order


How can I get the correct order? I am getting different output for the sample test case.

@shruthi019 hi,just sort the input string using sort function and you will get correct output ,rest your logic is correct .Hope you get it :slight_smile:

1 Like