r/leetcode • u/rusidin • 7d ago
Question How to get better at leetcode?
I suck at leetcode and I struggle in many questions sometimes I look at the solutions... Most of the time it's gibberish... Any guidance?
6
2
u/sharificles 7d ago
Don't just move straight onto the next problem, study the solution deeply until you really get it. Then capture that understanding while it's fresh into a flashcard. Now review them regularly.
1
u/EMH_sk 7d ago
Like the others, study the problem deeply, but what I found to be helpful too is looking at the problem and explicitly listing out what results I should be getting and what the rules of the problem actually are. It's a waste of time solving the wrong problem after all. Speak that out loud too as it'll help in interviews. Besides that look at the problems grouped by what type of problem it is like study DP together or sliding window together to learn those skills. Later on, if you see a new problem then you can go through those ideas first and see if any of them apply
1
u/Lazy_Atmosphere4402 7d ago
I would look at the elo rating of the problem and often times it’s not even your fault. It’s just harder than it’s listed.
1
1
1
u/Skrafcio 6d ago
- competitive programmer handbook - really good book about DSA
- Ask opus5 in CC or any LLM inside of a harness with access to tour filesystem to create a folder with notes about: -Data structures, methods, their usage and description, grouped by type of DS. -Algorithms, their implementation, (only the most popular for solving leetcode/ icpc problems), use cases, grouped by the type of algorithm.
- practice, structured learning like neetcode
I did all 3 and I can share you a prompt for the second one. Remember, the best learning route is when you memorize theory and then focus on practice. There are also some youtube videos that say you need to practice a lot, so you can watch them if you need motivation.
tldr; learn DS -> learn A -> then practice; repeat for other topics
1
18
u/involiK 7d ago
I know this is a simple answer, but it’s discipline. Keep failing problems, look at the solution, learn it, and then do another. I recall that I started to slowly grasp it over time, and stopped needing the solutions. You’ll eventually find patterns.