3 ms·
This "worst-case" issue seems silly to me. If all your elements magically hash to the same bucket somehow and you end up having to make a list or a tree out of
by marshray 14y ago
This "worst-case" issue seems silly to me.
If all your elements magically hash to the same bucket somehow and you end up having to make a list or a tree out of them, you're still no worse off than if you used a list or a tree in the first place.
- aidenn0 14y agoMost hash-table implementations either re-hash or use an O(n) lookup structure. And replace "magically" with "a malicious attacker" and you see it does come up more often.
- aidenn0 14y agoThough in general, you are right that academics tend to be over-obsessed with worst-case performance; see e.g. heap-sort.