I was contacted by a recruiter who gave me time to prepare for the screening. During the interview, I was presented with a medium LeetCode problem. I asked some clarifying questions to ensure I understood the problem correctly and then laid out my plan for solving it. I was already familiar with the problem and was able to solve it using the most efficient approach. I explained both the space complexity and time complexity, which were confirmed as correct upon later review. My code used meaningful variable names and was written clearly.
However, I missed checking for one out-of-bounds index, which I intended to mention but was interrupted and lost my train of thought. Despite this, I asked the recruiter if my solution was the best possible one, and they confirmed it was. The next day, I received a rejection call, stating that my code was not good. This feedback was surprising because I had checked my solution multiple times, and it was the most efficient approach. The code was clean, with properly named variables and comments.
I am unclear about the feedback, as it does not align with my understanding of the solution’s quality. It’s possible that another candidate had a better solution, but without specific feedback, it is challenging to understand how to improve.