Problems > Most Frequent Word > Editorial

Most Frequent Word — Solution & Editorial

Back to the Problem

Count words with a hash map; among maximal counts return the smallest word.

Complexity: O(length)