2 ms·
Since the array size is known ahead of time, it's easy to initialize a hash table with an optimal capacity. No need to use fancy tree structure.
by ww520 8y ago
Since the array size is known ahead of time, it's easy to initialize a hash table with an optimal capacity. No need to use fancy tree structure.
- KirinDave 8y agoThe size of the table isn't the trick. It's the perfect hash function that you want. If you have that then you've already solved the problem at hand.