News for hackers. Stuff that matters.
Re:Asana Engineering Interview Guide by benwaffle on Tuesday March 29, 2016 @02:32AM (#11379845)
>If they believe it's O(1), argue it's worst case O(n)

In the case that all your keys have the same hash, right?

Re:Asana Engineering Interview Guide by Rapzid on Tuesday March 29, 2016 @04:28AM (#11380203)
It seems to me this would entirely depend on the implementation and how collisions are handled.
Re:Asana Engineering Interview Guide by sorokod on Tuesday March 29, 2016 @05:44AM (#11380431)
In Java 8, collisions in Maps are stored in a tree structure so worst case is O(log n)
Re:Asana Engineering Interview Guide by logicchains on Tuesday March 29, 2016 @07:20AM (#11380688)
Is it a balanced tree? If not, worst case could still be O(n).
Re:Asana Engineering Interview Guide by Rapzid on Tuesday March 29, 2016 @11:33AM (#11382194)
Haha, that would be an odd set of data indeed. I have no idea how they implement it but I hope I have made a point(I feel I have). I wouldn't be too impressed with an interviewer or interviewee arguing one side or the other about the complexity of "unspecified hashmap implementation".

Too clever by half.

Re:Asana Engineering Interview Guide by thaumasiotes on Tuesday March 29, 2016 @05:30AM (#11380379)
Buckets. :)
Re:Asana Engineering Interview Guide by mintplant on Tuesday March 29, 2016 @02:58AM (#11379936)
Right!