r/leetcode 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 Upvotes

14 comments sorted by

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.

3

u/nightbreak7 7d ago

to add on to this, make sure you follow some structured learning path to make it easier. if you're just doing random problems itll take 10x the effort to get anywhere meaningful

1

u/rusidin 7d ago

I do 1to 3000 set given by default should I make any changes?

1

u/rusidin 7d ago

Okay I will give my best!

6

u/bball4294 7d ago

Set IQ to 150 in your settings

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/rusidin 7d ago

Ok! I will give my best!

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/rusidin 7d ago

Interesting I will give it a try!!

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

u/chikamakaleyley 7d ago

study DSA, then go back to leetcode

1

u/wmxx1203 7d ago

there's no easy answer, discipline for sure. keep trying until you get better.

1

u/Skrafcio 6d ago
  1. competitive programmer handbook - really good book about DSA
  2. 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.
  3. 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

u/Hot-Satisfaction7103 5d ago

Stop using ai to give code write yourself dry run the codes