Reddit Question · 2026 Q1

Cleared a Hard coding problem yet got rejected — trying to understand what happened

97 upvotes 75 replies

Question Details

Had a coding interview recently with a big tech company (leaving out names). There was only one interviewer. He gave me a hard-level LeetCode problem. Luckily, I had seen something similar before, so

Full Details

Had a coding interview recently with a big tech company (leaving out names). There was only one interviewer. He gave me a hard-level LeetCode problem. Luckily, I had seen something similar before, so I was able to solve it pretty quickly (around 5 minutes). I explained my thought process, walked through edge cases, wrote tests for critical parts, and cleaned up the code. He then extended the question with an extra constraint. I handled that too and explained how the changes affected the solution. Then came the “can we optimize space?” part. I threw out a few ideas. At one point, I mentioned a method. The interviewer seemed interested and encouraged me to try that direction, so I implemented it. After wiring everything up, I realized the method actually didn’t work. He added something that didn't make sense. I felt that he didn't prepare well for this problem, so I moved on. Then there was also a small discussion about space complexity. My understanding was that it should be related to each word's length (like O(N * L)), but he said it's O(N²), which is incorrect. I briefly explained my reasoning, but didn’t want to turn it into a debate, so we moved on. Then got a rejection today. No reasons, of course. I’m not salty (okay, maybe slightly), just trying to figure out what I could have done better. How am I not qualified for a second round interview?
Free preview — Unlock all questions →