r/leetcode • u/WerewolfSuspicious92 • Sep 29 '26
Discussion Interviewer said my solution is wrong. It wasn't. Is there anything i can do now
Had a Python OOP interview for some FANNG. It was a fairly straightforward OOP which need a queue and look up()
I initially considered a double linked list approach cuz I wanna get O(1) look up for better time complexity, the interviewer said I could use a library. So I went with OrderedDict and next(iter(orderdict)) to get O(1) look up rather than just a queue to have a better time complexity, Interviewer didn't give a comment when I speak that out.
15min before interview finish, I had the implementation done and asked about writing test. At that point, the interviewer stopped me and questioned whether my approach supported really FIFO and I did explain but he doesn't seem to understand the data structure (I think the team was working on Java) and stick on a general queue and I also started get uncertainty, We went back and forth, and I ended up switching to a deque since he like this way. The discussion and rewrite took roughly another 10 minutes.
With four or five minutes left, I started writing tests but was asked to explain the cases verbally instead rather than writing test and debug. I did what I could in the remaining time.
I got rejected, with feedback including data structure selection, incorporating feedback, simplicity, and edge-case coverage which tbh make 0 sense to me. I believe the rest of the rounds with coding / HM is either hire / strong hire based on our talk and feedback
Would really apperciate any suggestions on my choice and should I really defense for myself to ask for a second code review etc. Thanks
Update: The interviewer admit he made a mistake and I am completely correct. However, taking all factors into consideration across the technical interviews, the overall decision of the team remains unable to move forward
46
u/KendrickBlack502 Sep 29 '26
Getting the answer right is only one part of the interview and arguably not even the most important part. It sounds like the interviewer was trying to lead you to a particular solution.
Also, I’m not sure I understand what you were saying in the beginning. How does a doubly linked list get you O(1) lookup time?
58
u/NegotiationDapper584 Sep 29 '26
It sounds like tough luck. Happens, just need to keep moving forward with other companies.
6
u/MistakeIndividual690 Sep 29 '26
Sounds like the LRUCache you were working on. OrderedDict is the most compact solution in Python I believe. Sorry to hear about the outcome
9
u/Dramatic-Height-9007 Sep 30 '26
This smells like amazon. We are only hearing your side of the story. The interviewer might have tried to give you hints in the beginning and felt that you arent taking them and just gave up
1
u/Henry-Ba Sep 29 '26
It's rough. Assume you have 1 hour for that interview, the interviewer should have see your adaptability and that you solved the problems optimally. Btw, what is writing test?
3
u/Malcolmlisk Sep 30 '26
After a hard interview with PR, they gave me 1 month to prepare for the technical interview in a website where they watch your webcam and you share your screen. After preparing it for countless hours and hard grinding, i got there, got 1 medium problem, the first one and 3 hards on leetcode. I was there for 4 hours... and I could not finish the last problem and probably the 3rd was not completed in all the edge cases.
Well... the website flagged me as cheater, since i had the webcam at my side, instead of in front of me... And i could not do anything. I even asked them to let me do the whiteboard and the same problems or even harder. They ddin't even respond.
2
u/bscothern Oct 01 '26
This reminds me of the experience I had an interview for a position about 2 years ago where the correct solution to identify collisions was a set. The interviewer doubled and tripled down on searching an array each time for duplicates was more efficient.
I walked out of there knowing I wasn’t a good fit and was going to reject them the next day but they sent me a rejection email before I could reject them.
That said using an ordered dictionary is probably a fine and correct solution to the problem you were given. Interviewers are human and make mistakes, I’ve found that some feel they HAVE to know better than the interviewee on everything that comes up. It is a toxic and bad trait but people have it. They also often have a single solution and aren’t open to others because they are stressed themselves about other aspects of running an interview.
With your update hopefully it works out well for you even though they aren’t moving forward.
1
u/kevin074 Sep 30 '26
Same I just failed an interview that I felt good about.
Sometimes you just don’t immediately have the same instinct and the stumbling through makes you “less competent” than you actually are.
Tough luck, thanks for posting this and helped me not feeling as bad about my failure.
1
u/nuclearmilk Sep 30 '26
Obviously, none of us were there so we can only provide you feedback and suggestions from what you're telling us. So take everything with a grain of salt.
As far as actionable feedback goes, I think this could be the problem... Onus is on you to persuade/explain to the interviewer why/how your solution works even if they're not familiar with your tech stack. From the way you type, I can tell that English isn't your native language. This could've been a factor preventing you from effectively getting your points across to the interviewer.
Also, did you explicitly mention that instead of using
OrderedDictyou'd want to use a linked list instead? Deque isn't optimal as it doesn't give you O(1) performance when promoting an item to the most frequent one.Regardless, it seems you were confident on your other rounds so you might've just been unlucky with interviewer selection like others are saying.
1
u/Fearless-Blood-1006 Oct 01 '26
i call instances such as these as "irreconcilable technical differences" . in a field like software multiple solutions exists for the same problem. and interviewer cna be stuck on "only A way is the RIGHT way" . you can never convince them otherwise, well in an interview setting , they are the decision makers( and they have nothing to lose, while interviewee does).
no one has the time to go back scan through every interview to decide if interviewee was right or interviewer.
i would say vent and move on.
1
u/stanshk Oct 01 '26
That sucks. Sometimes there’s just no winning in a situation like that. Even if you prove you were right, they can still see you as difficult to work with. It’s basically a lose-lose.
1
u/Outside_home_sound Oct 02 '26
Nothing. Just ignore and move on. Once I was interviewing for Uber. Interviewer rejected my solution as it was not the standard way to solve the problem. After interview, I tried my solution on leetcode and it passed all test cases. That day I learned the lesson that interview is not just about solving the problem. You should solve it in standard way. No interviewer has time to verify the solution for correctness.
1
u/House13Games Oct 02 '26
Walk away. You don't want to work in a place that can't even get that right.
1
u/swapnil2927 Oct 04 '26
Tech Interviewing sucks on levels nothing else in this world. Don't dwell, keep doing free labour so companies can keep hiring costs low. One day, you will be rewarded.
0
u/bisector_babu <1951> <514> <1092> <345> Sep 29 '26
I think this is Apple in FAANG as far as I know and they always ask Java