I got a call from an interviewer and asked me this question (Given a List of Integers, find all the unique arrays of size k and sum t). I have given him a recursive solution within 15-20 mins and then he stated to me to remove the duplicates. I added a condition to filter the duplicates. At this point, my heart said that I have a great chance of passing this round. He was not satisfied with the solution because he wasn't aware of my implementation. He kept saying your code is different, different... LOL. He expected a diff code which he knows. He tested every possible case (with dups, negatives), it worked. I smiled inside. He asked me about the complexity of the solution. I said it is an exponential time. He denied and said it is n^2. WAIT What seriously??? My bad time started there... Then he wanted me to optimize the code. I did whatever I can to increase the speed by adding some conditions. The only other thing I can do is to convert that part into iteration by using Queue/Stack, but then he suggested me to use DP. I felt clueless. By this time, l lost all my confidence. I reckon he was not even aware of a proper solution. It was very difficult to understand what he was saying. His accent was very poor. Added that, he doesn't even know the complexity of the problem that he has given. I feel that he misguided me. Beware guys. I don't really believe in luck but HARD WORK. It really sucks. Throw your views. Update: Edited and Reposted.
Seems like a close minded idiot.
The only thing more disastrous than your interview performance is this wall of text.
Is it MSFT IDC?
No Bing Ads it is.
Sounds like you got some stupid HR Manager who was given a script- knows nothing about code.
This was on a phone call? Or some online coding interview?
on a phone call + coderpad.
If you feel strongly about it, you could let your recruiter know and ask for a different interviewer.
Really? Like doesnât it come off as pretty bad to say ~âthere were some issues with my interviewer and I with communication and I proposed a correct working solution that he tested and verified, but he then said it was different from the one he expected and told me I was incorrect on the time complexity which I have verified I wasnât...(idk how deep to go cuz at this point I feel I def wouldnât have gone this far/said this much, but you need to say enough that the recruiter knows youâre not just asking for a redo cuz you did poorly)â
I did. Sadly, I didn't get any response from the recruiter. Not even a reject. This is my first interview with Microsoft and I have a great respect for Microsoft.
Iâm not surprised, I interviewed there recently and had an interviewer who didnât realize the solution could be done recursively. Then he also didnât know what âtail recursionâ was. Ended up getting the offer and lowballed. Next time I know better than to waste my time with Microsoft.
Sorry you had a bad experience. You should respectfully share the feedback with your recruiter. And all the best.
I did. Sadly, I didn't get any response from the recruiter. Not even a reject. This is my first interview with Microsoft and I have a great respect for Microsoft.
Thatâs ok. Donât expect a response back. A phone interview rejection shouldnât stop you from interviewing with other teams at Microsoft. Keep applying for other positions and prepare better.
I see this quite a lot actually. When the interviewer asks for a different solution, I know for sure he does not know my solution. A problem can have multiple solutions and the interviewer has to understand the solution/ or at least make an attempt to understand the solution and then suggest to optimize it. If one ask a different algorithm question to these interviewers, they without doubt will struggle. I can tell they would have memorized some LC solution before asking that question. It is just a shame that many interviewers now have this mindset. Most books suggest to have a brute force/working algorithm before optimizing it. But many interviewers nowadays want the best LC solution. I observed this in LinkedIn onsite, Dropbox, Juniper networks.
Well now you should start believing in luck đ€
Getting a job offer is when timing, preparation, and some good luck all come together.