Skip to main content

Word Frequency

Challenge on lesson: Checkpoint: Collections

CHALLENGE
Difficulty: beginner+25 XP

Implement word_freq(text) returning a std::map<std::string,int> counting lowercase space-separated words, and most_common(freq) returning the alphabetically-first among the most frequent.

Back to lesson: Checkpoint: Collections