How can I get the correct order? I am getting different output for the sample test case.
Unable to obtain correct order
@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 
1 Like