At an interview, interviewer keep on hitting me with theoretical questions, why python don't have switch cases, what is default sorting in java etc... I told him I don't bother about theory, then this conversation happened.
I: do you know time complexities?
me: Yes
I: okay, tell me a few sorting or searching algorithms which have logarithmic complexity?
me: binary search (with loud and confident voice)
I: he told, in worst case it will have O(n) tell me any other
me: *thinking*
I: what are you thinking? what is time complexity of merge sort
me: O(nlogn)
i: it's logarithmic....

Add Comment