3 ms·
Well, nobody I know uses hash tables without periodically "rebalancing" them either. Where I went to school, we were taught not to compare the worst case behav
by bayareaguy 19y ago
Well, nobody I know uses hash tables without periodically "rebalancing" them either.
Where I went to school, we were taught not to compare the worst case behavior of one structure to the average of another. We were also taught not to confuse binary trees with red-black trees.
- tptacek 19y agoYour school taught you to "balance" hash tables?
- bayareaguy 19y agoThe quotes were there for a reason.
- ckuehne 19y agoI guess your school sucked. Red-black trees ARE binary search trees. Also: the worst case behavior of a hash table is in fact worse than that of a balanced (red-black tree, b-tree, avl-tree) search tree.
- bayareaguy 19y agoRed-black trees ARE binary search trees. Agreed. However the original poster said binary tree, a specific structure whose worse case behavior is O(n) just like a hash table. They didn't say binary search tree (which as you observe may refer to one of several possible structures).