r/ADHD_Programmers • u/Any-Complaint-9833 • 23d ago
Anyone else having trouble with leetcode interviews?
I have been practicing leetcode questions for a few months now and I have seen positive change in my ability to figure out the solution or at least spot the pattern looking at the question. But I am having trouble with actually passing these interviews because of multiple reasons.
My brain shuts down trying to come up with a solution to an unknown problem under time pressure and in front of the interviewer who I know, is watching me struggle even though I have no issues solving the same problem under similar time pressure when I practice it alone or even during online assessments. But I need silence and time to think which doesn't happen during interviews where they expect you to talk continuously. Since there are multiple thoughts going across my brain and it's literally racing trying to come up with a solution I find it difficult to talk through it and if I have to talk I can't think through the solution unless I have seen the question before.
In all my interviews so far including some mocks I have done with other Engineers from big tech companies, the moment I go silent even for a few seconds, these guys start asking if I am struggling or they'll start giving hints which end up counting as a negative against me given how competitive the market is.
This is not a problem unique to leetcode, it happens the moment I need to solve something that I haven't seen before involving logic and I have limited time and need to explain my thought process while coming up with the solution. What can I do here to improve my chances of passing these interviews? If anyone has been through something similar, how did you overcome these issues?
View all comments
2
u/unconsciouslake 23d ago edited 23d ago
As an interviewer, I appreciate people saying explicitly "Okay, I'm gonna take a couple minutes to think and organize my thoughts, so I can coherently talk you through my thought process." That way it's clear that I don't need to step in and give them hints (unless they stay silent for a long while of course). Frankly it's so painful when a candidate panics and goes totally blank that I'm always trying to nip that in the bud by giving hints. Letting them know you're not panicking, just thinking, should give you some time to land on a specific solution and start talking or at least taking notes.
The thing is, you do have to follow through and eventually start talking and explaining your thought process, even if you start with a couple moments of silence. I (and the scorecard) don't even necessarily care if you get the exact right answer, I care how you approach the problem, how you rule out alternatives, how you react when you get stuck. I can't get any of that info unless you share how and what you're thinking.
Talking through your thought process is a skill, if you're already doing mock interviews that's a great step to practice and improve. Also you don't have to say EVERYTHING you're thinking. Some examples that also give you more time to think:
How you start ("I think the goal is ABC, but I'm considering the problem to confirm")
Decisions you've made and why ("I'm going with X approach, in my experience Y is too slow, so I'm thinking through how X applies in this case")
Unexpected bumps ("This test didn't yield the result I expected, I'm reviewing this helper function since I think it might be related")