Skip to content

Stringpopulation_in_descending order - #263

Merged
seeditsolution merged 1 commit into
seeditsolution:masterfrom
cadwellh5:patch-4
Oct 2, 2020
Merged

seeditsolution merged 1 commit into
seeditsolution:masterfrom
cadwellh5:patch-4

Conversation

@cadwellh5

Copy link
Copy Markdown
Contributor

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')]

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')]
@seeditsolution
seeditsolution merged commit b198a49 into seeditsolution:master Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants