Sponsored
Use these hints if you're stuck. Try solving on your own first.
What data structure can we use to help us quickly find whether an element belongs in an array?
Can we count the frequencies of the elements in each array?
Solve with full IDE support and test cases