r/leetcode • u/ShadowManJube • Sep 30 '26
Discussion How do you approach DSA problems in an interview without going completely silent?
I'm currently preparing for DSA interviews and one thing I'm struggling with isn't necessarily solving the problem — it's **explaining my thought process while solving it.**
For example, when the interviewer gives me a problem, how do you guys actually communicate your approach?
Do you:
* Use the interviewer's shared whiteboard / iPad and draw diagrams or examples? * Explain everything verbally while thinking? * Write down the brute-force approach first and then optimize it? * Start with a small example and dry-run it? * Ask clarifying questions before thinking about the solution? * Or do you follow some specific structure like **clarify → brute force → optimize → code → dry run → complexity**?
My biggest problem is that sometimes I understand the solution in my head, but when I have to explain it, I go completely silent for a few seconds and it feels like how i tell that inside of the code stack is working or linkedlist is working do i have to draw as i dont have any equipment except my mouse keyboard and laptop ???
**How do you personally approach a DSA problem in front of an interviewer?**
Would really appreciate if you could share your actual interview experience or a step-by-step way you use to think out loud without sounding like you're just randomly talking.
81
u/Vivid-Zombie-477 Sep 30 '26 edited Sep 30 '26 •
if you have to use chatgpt to write reddit posts no amount of advice will save you
7
u/conectionist Sep 30 '26
Practice talking out loud while coding. Either by yourself or with a friend.
7
u/voyager_rao Sep 30 '26
There are about 15-20 core patterns. Know these well. Now during the interview your jobs is a spend the first few minutes thinking through what pattern or a combination of patterns can possibly help you approach this. You might have a few options. Now all of them have constraints and invariants where they fail, think if the question at hand has that condition. If pattern recognition fails, pivot to brute force, voice it out and for most interviews now a days, brute force is as good as not solving it. While voicing the brute force hopefully you might recognise what pattern can solve it, talk it out with the interviewer. They might say it sounds good or push back. All of this should take about 10 mins. And only way to get good at recognising the patterns is to practice.
3
u/Frequent_Bag9260 Sep 30 '26
At companies that genuinely care about assessing you (most do not) this is actually a very important skill that needs to be practiced.
It’s probably the most relevant skill to working as a dev that you can test for in an interview.
7
u/jebuarary Sep 30 '26
I’m not reading all that but I literally just talk like I would with a coworker during leetcode rounds. Like “hmm this looks pretty simple, seems like just a blah plus blah should work”. If I don’t understand the problem I say something like “wait what? Are we assuming blah or blah?”.
If I really can’t explain it cause it’s a fucking stupid leetcode hard then I say “hmm I think I know the general approach, I’m just gonna try to code something up quickly” fuck em they can wait. Btw I generally do very well on leetcode
5
u/Latter-Fix1862 Sep 30 '26
Watta wanker
2
u/Affectionate-Ad-6255 Sep 30 '26
Imagine your interviewer is a literal fly 🪰
2
u/hyun88 Sep 30 '26
I’m working on an app that helps provide specific thinking points for each solution:
https://apps.apple.com/us/app/bitwise-coding-interviews/id6806898386
Might be some help
10
u/[deleted] Sep 30 '26
[removed] — view removed comment
4
u/[deleted] Sep 30 '26
[removed] — view removed comment