A histogram display by the frequency of occurrence of characters

Generate a histogram display by the frequency of occurrence of characters in descending order, and secondary sort alphabetically.

Sample Solution