Medium
Letters by Frequency
Read a word. Print each letter and its count as
letter:count, most frequent first; letters with the same count in alphabetical order.Input
One word.
Output
Lines.
Sample 1
Input
banana
Output
a:3 n:2 b:1
Sample 2
Input
abc
Output
a:1 b:1 c:1
Output appears here