Big O for collections April 8, 2013Posted by javafoo in java, java interview.
Yes, if you claim 10+ years of java experience and fumble/fudge on Big O complexity for collections, you are out. So please understand/read up on that. Happened to me, could get all the design patterns, OOPs, architecture level questions right, but fumbled on big O and the interviewer was like mmm…ok then, I don’t have any more questions, see you. I so want to jump in a well, even I wouldn’t hire myself. No, a map does not have O(n) complexity, it has closer to O(1) complexity or more if there are collisions. See here: