4 ms·
Why would that be "more copies" than building up a hash table is what I don't get.
by KirinDave 8y ago
Why would that be "more copies" than building up a hash table is what I don't get.
- bjoli 8y agoIt requires many passes through the list, and even O(LogN) is probably enough to make it slower than a hash based O(n) approach depending on list size. Hashing is fast. If space is an issue, just use an appropriately sized bloom filter.