top | item 45900167

(no title)

nickstaggs | 3 months ago

For me there are 2 components to staying motivated.

1. Measurable, manageable goals. Don't toil for hours on end. I set the goal of 1 hard, 2 medium or 3 easy problems a day. And if I get stuck I consult chatgpt study to help direct how I should think about a certain problem.

2. Make it competitive. At least for the actual leetcode site you see how your run time and memory consumption stacks up against other users. I try to be the best in one or both. This can also get at run time and space complexities. You can also see the solutions for the fastest run times which can teach you some lower level ideas for the language you are using. I learned about holey arrays in Javascript due to this and how certain conditionals are better optimized for v8.

discuss

order

blutoot|3 months ago

I am indeed learning a lot more about Python through my leetcode exercises. E.g. (this might sound lame to many) but I had never used the defaultdict type or the @lru_cacbe decorator up until I started doing leetcode.