Task 2 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

10.4 Patterns — the highest frequency

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in maxFrequency so that it returns how many times the most common word appears.

Two steps: build the frequency map, then scan its values for the largest. For an empty array return 0. The program prints 3 and then 0.

Your solution