Re:Finding unique items: hash vs. sort
by matvore on Wednesday January 08, 2020 @12:32AM
(#21988639)
No, it's still O(N) amortized. Imagine if the hashmap doubles in capacity whenever it is full or hits its max load factor. Then you end up having O(N) copy operations. O(2 * N) = O(N)
[ Parent
| on HN ]