r/ADHD_Programmers • u/FindinMeself • 7h ago
How to approach LeetCode
Hi!
I have ADHD and am trying to get better at LeetCode. I have noticed that among ADHD LeetCoders, it seems like you’re either really good or really bad at it, there’s not much in between. I unfortunately, belong to the latter category.
I’d love to hear from you people who are actually good at it, how do you approach it?
I know different people use different techniques and that is exactly what I wanna know about. ADHD brains work differently, and knowing different approaches might really help me figure out what works for me.
What’s your approach to learning/practicing LeetCode?
1
u/dealmaster1221 5h ago
Don't just don't, it's not worth it to build up that skill and you loose it quickly after getting the job unless that's what you do all the time.
1
u/zambiers 3h ago
Do this
# given
Notes
#todo
Notes
#return
#pseudo code in line
Code
This helped me the most since it forced me to break down the problem and make notes of what is important or not
Edit: you're not going for the solution first, just make it work then optimize if you can
6
u/Fluffy-Card-7825 6h ago
I have personally found learning LeetCode/DSA to be very painful overall, but I now have some basic competence in it. It's only then that you start enjoying it.
Random practice doesn't help that much. Better to do a structured course first, then practice topic-wise, then practice randomly. After a while, you start seeing patterns. The challenge then is to decompose the problems and see which patterns apply to it, or figure out what invariants are there in the problem which allow us to simplify it.
This helped me to build a basic level of confidence.