some people will not understand what you explain. and they will ask question very rudely
i will give example:
He asked one question ie : find sum of any two intergers in a array should match the given input.
i explained by using two for loops.
but he asked me to optimize the code, i said without two for loops we cant.
He explained very rudely, we can achieve with the complexity O(n) by using hashmap.
In this case we need at-least one for loop but we have to store all sum into the hashmap
do you know internally how many loops it is using to store element. finally what ever he told thats wrong. its complexity is also same as above.
So i am suggesting him please prepare some quality quostions before taking interview.
please change the attitude.
suggesting , please dont send such type of persons to the interview panel. and dont miss good candidates.