4 ms·
Read what I wrote. Rebuilding is not free.
by Udo 10y ago
Read what I wrote. Rebuilding is not free.
- zzzcpan 10y agoThere are various trade-offs, as I said, but getting O(1) worst-case look-ups is not hard. Only naive implementations could corner you into O(n) worst-case. I'm sorry, but you don't really understand hash tables.
- Udo 10y agoRead things more carefully before rushing to judgement. I'm not talking about a lookups-only scenario. Of course you can make anything O(1) as long as you arbitrarily define all the parts that aren't as external to the solution, but you're just kidding yourself in the end. > I'm sorry, but you don't really understand hash tables. I'm not the one who made this personal, but I'll match that allegation back to you, and I raise you one "you don't really know how to interpret what people say".
- zzzcpan 10y agoI'm sorry, I didn't mean to make it personal.
- Udo 10y agoHonestly, I think implying that rebuilding the hash table is an O(1) operation is worse. :P But judging by the downvotes I'm getting on that particular comment, it seems that most people agree with you that rebuilding is indeed free. So it seems you won this argument on several fronts ;)
- treebeard901 10y agoPlot twist: zzzcpan was the interviewer.
- Udo 10y agoI'd call that a Seinfeldian twist ;)