Task 7 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 →

Problem

10.4 Patterns — capstone: compare two lists

Read a first list (a count, then that many words) and a second list the same way.

Print three numbers, each on its own line: the highest frequency in the first list, how many distinct values appear in both lists, and how many items of the first list are missing from the second (counting every occurrence).

For 6 / a b a c a b and 3 / b c d:

3
2
3

All three patterns of this lesson in one program: a frequency map, an intersection, and a difference.

time 1000 ms memory 256 Mb
Solution
Attempts: 0 A hint guides you to the fix — it never writes the code for you.
✦
Ready to check

Press «Submit» to run your code against the task's test cases — that is what sets your score. «AI review» is an optional second opinion: it reads your code — logic and style, not just the output — and suggests the next step without handing over the answer. It never changes your score.

Working…