3 ms·
Is it a balanced tree? If not, worst case could still be O(n).
by logicchains 11y ago
Is it a balanced tree? If not, worst case could still be O(n).
- Rapzid 11y agoHaha, 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.