FunctionRacerProblemsRace

Overlap Count

BeginnerNumPyPython

Return how many items of a also appear somewhere in b. Each item of a is counted on its own, so repeats in a count every time. Hint: np.isin.

Example 1

a [1,2,2,5]
b [2,5,9]
returns 3

The items 2, 2 and 5 are in b.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems