Coding Challenge: Count Words in Moby Dick
The book "Moby Dick" by Herman Melville describes an epic battle of a gloomy captain against his personal nemesis, the white whale. Who of them is mentioned in the book more often?
Write a program that counts how often each word occurs in the book. Determine how often the words
whale occur. You will need different data structures for counting words and for sorting them.
When you know whether
captain occurs more often, you have mastered this challenge.
Use the 8 hint cards as necessary.
You can find the full text for Herman Melville’s “Moby Dick” in the text file
mobydick.txt and on