4 ms·
Sorry, I switched set and unordered set in my mind. Still, a generic hash table isn't going to match a tailored data structure.
by rcfox 8y ago
Sorry, I switched set and unordered set in my mind. Still, a generic hash table isn't going to match a tailored data structure.
- saagarjha 8y agoI mean, it might. I only had to construct one trie, and I used it hundreds of millions of times, so O(1) child (hash) lookup ended up being faster than the O(log(n)) binary search lookup, at best, from the data structure described in the article. And since the data structure in the article wastes some space as well, I may have even used a similar amount of storage.