also please tell what will be the output if two characters have the same frequency
1 test case failed
@mohdkaifalam041 if two characters have the same frequency we need to print the one which comes first in order.
for your code consider the possibility of input string of length 1