3 ms·
It requires a single pass through the array, whereas the article suggests different approaches that all go through the array multiple times (or even O(n^2)). Fo
by bjoli 8y ago
It requires a single pass through the array, whereas the article suggests different approaches that all go through the array multiple times (or even O(n^2)). For small lists this is probably ok, but for big lists it is a very slow approach.
Edit: I would probably use a bloom filter for this.