Problem 350 · Easy

Intersection of Two Arrays II

Return the values shared by two lists, keeping repeated values as many times as they appear in both. The visual counts each list's values and pairs off matching counts.

Open the interactive visualisation