Commit bc33158
authored
Stringpopulation_in_descending order
The program returns a sorted list of the letters in that string from most popular to least popular.
eg:
input: output:
"A man, a plan, a canal: Panama" [(10, 'a'), (6, ' '), (4, 'n'), (2, 'p'), (2, 'm'), (2, 'l'), (1, 'c')]
"Testing, attention please." [(5, 't'), (4, 'e'), (3, 'n'), (2, 's'), (2, 'i'), (2, 'a'), (2, ' '), (1, 'p'), (1, 'o'), (1, 'l'), (1, 'g')]1 parent 229f8d6 commit bc33158
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments