Most Frequent Word
text has words separated by single spaces. Return the word that appears most often. If several words tie, return the one that comes first in alphabetical order.
Example 1
text "to be or not to be"
returns "be"
to and be appear twice; be comes first alphabetically.
Constraints
1 <= len(text) <= 100- Lowercase words and single spaces
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.