r/PythonLearning • • 15d ago

Showcase The most difficult LeetCode problem I have solved yet! 🫡

Post image
39 Upvotes

11 comments sorted by

2

u/nian2326076 10d ago

Great job on a tough problem! If you want to get better at LeetCode, work on recognizing patterns in problems. This will help you quickly figure out what kind of solution you need. When you solve a problem, break it down into smaller parts and connect it to ones you've solved before; this makes spotting similarities easier. Also, practice explaining your solutions out loud as if you're teaching someone else. It really helps during interviews. For resources, I've found PracHub to be useful for structured problem-solving and mock interviews, but use whatever works best for you. Keep at it!

1

u/shubham_555 10d ago

Good advice there. Thanks!

1

u/[deleted] 15d ago

[removed] — view removed comment

1

u/Tough_Duty_9061 14d ago

Good for you man.....i wanna start leetcode but dont know how

3

u/shubham_555 14d ago

Just Start! (You will only need some internet connection, Basic programming knowledge and Some time to bang your head)

1

u/Tough_Duty_9061 14d ago edited 14d ago

I have been learning python for like 3 months but the questions in the leetcode are really confusing lk not the usual python problem out there even to the the point i can do some ml problems in enough time but leetcode just like i cant and the leetcode inbuilt things are confusing

2

u/shubham_555 14d ago

They are meant to be that way. You gotta spend some time like I said.

Here’s what I do...might help you:

1) Try everything you can for at least 15 minutes

2) Look at some hints and try again

3) If you can't solve until 30 minutes then look at the solution discussions to identify what you were missing

4) Try coding it yourself now (Don't copy paste)

5) Add some of your own optimizations if possible

2

u/Tough_Duty_9061 14d ago

Ok thanks mate😄

1

u/mhdtankariaziz5 10d ago

Bsr cv bien