Course · Section 11: Working With Arrays · Lecture 149: Simple Array Methods
Implement `intersection(a, b)` returning the unique values present in both arrays, in the order they first appear in `a`.
+ 1 hidden test run on Submit.
A Set of b enables O(1) membership checks while you filter the deduplicated values of a.
Run your code to see results.