3 ms·
pick some from each pattern. Adjust more or less based on your comfort with each pattern eg: pick more sliding window pattern, dp, greedy vs pick less for bina
by dominotw 6y ago
pick some from each pattern. Adjust more or less based on your comfort with each pattern
eg: pick more sliding window pattern, dp, greedy vs pick less for binary tree/dfs problems.
- eulers_secret 6y agoThis is where I’m stuck: how do we know which patterns are possibilities? I’ve never seen a “patterns for leet code” website, yet. Further, how does a naive person know which pattern applies to a problem? Without that knowledge, how can I vet a learning resource and know I’m not wasting my time?
- dominotw 6y ago> i’ve never seen a “patterns for leet code” website, yet. https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed https://hackernoon.com/14-patterns-to-ace-any-coding-intervi... > Further, how does a naive person know which pattern applies to a problem? Without that knowledge, how can I vet a learning resource and know I’m not wasting my time? Problems in leetcode have tags under "related topics" and you can look at discussions to find out the pattern. That said, sometimes its not simple pattern matching. Its an itution that you can develop if you keep solving leetcode problems.