3 ms·
Personally I don't think "grinding" is the right way. The key thing is to truly understand the data structures and algorithms you're working with. Just grinding
by TrackerFF 11mo ago
Personally I don't think "grinding" is the right way. The key thing is to truly understand the data structures and algorithms you're working with. Just grinding away is kind of like solving hundreds of difficult integrals and partial differential equations, without really understanding the math 100%, but hoping that you'll meet on a similar problem one day.
So first step is to really understand the theory, if you're not completely confident, or feel that there are obvious blind spots / gaps.
Next up I find it easier to classy the problems by type. Truth is that most leetcode problems are variations of more general subclasses. You'll have the knapsack problems, and other types. Learn to identify these, and study the more generalized versions of these problems, before you start solving the more specific versions.
I'm not saying that grinding is useless, because it can help you on speed and increasing your chances in stumbling on a problem you've solved before. The truth is that there's also an element of speed / efficiency to the LC-style interviews. But I think any sort of grinding should come after all the other things I've mentioned.
- HPsquared 11mo agoDiscussing the theoretical aspects of each problem with an LLM can also be helpful or at least give some inspiration. Usually.