Skip to content

Need to modify the word occurrence algorithm #1895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Prince326 opened this issue Apr 20, 2020 · 1 comment · Fixed by #1896
Closed

Need to modify the word occurrence algorithm #1895

Prince326 opened this issue Apr 20, 2020 · 1 comment · Fixed by #1896

Comments

@Prince326
Copy link
Contributor

The following program counts the occurrence of words in a string but, it also counts extra spaces in the string as words. Need to modify it so, it won't count the extra spaces as words

https://github.com/TheAlgorithms/Python/blob/master/strings/word_occurrence.py

@cclauss
Copy link
Member

cclauss commented Apr 20, 2020

Can you please create a doctest that fails because we are counting incorrectly?

@cclauss cclauss changed the title need to modify the algorithm Need to modify the word occurrence algorithm Apr 20, 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 a pull request may close this issue.

2 participants