Skip to content

Latest commit

 

History

History
25 lines (13 loc) · 1.88 KB

File metadata and controls

25 lines (13 loc) · 1.88 KB

how i advice people to solve leetcode problems

patterns are everything. once you see the same problem structure, you just plug in the template. no need to turn into nikola tesla every time.

start with the easy ones. once you build confidence, understand the platform. don't jump straight to hard, else you'll just get frustrated and waste time.

data structures matter. just learn arrays, trees, graphs, and stacks inside out. the fancy algorithms can come later, but these are literally your bread and butter.

read the problem twice. understand what's being asked, what the constraints are. then think about edge cases before you even start coding.

time and space complexity... think about them early. leetcode doesn't care about your feelings, but it cares about efficiency.

practice daily, but don't burn out. consistency beats intensity every time.

when stuck, look at hints or similar problems. it's not cheating, it's learning. i advice you do this when you know you are really stuck. else...you'd just die!

if you like use typescript, python, or c...just pick your weapon and stick with it. master one language well instead of being mediocre in many. i write alot of c, i also used to write php at one point, stopped in 2022, and picked up typescript. i think it's been good over time.

debug like you mean it o. print statements are your friend in this case. i recall an interview with dsa problem and i wasted my time when i did not debug at each point. step through the code, don't guess.

after solving problems, try to read other solutions. there's always a better way you didn't think of. i promise you. people out there aare crazy smarter than you. a better way is usually a shorter more clear system.

keep a notebook of patterns and tricks you use. else, you'll forget them.

most importantly, enjoy the process. it's about getting better at problem-solving, not just collecting green checkmarks.