3 ms·
Good question. LC mainly deals in general-purpose algorithms, so if you're getting diminishing returns there, then my advice would be to probe your domain speci
by timoteostewart 4y ago
Good question. LC mainly deals in general-purpose algorithms, so if you're getting diminishing returns there, then my advice would be to probe your domain specialty for niche algorithms or data structures. That might mean journals or online communities. Like I'm sure there are hangouts for machine learning (ML) folks, for functional programming (FP) folks, for automation nerds, and so on where algorithms and approaches relevant to the niche are bandied about.
Another option is to use the LC problems as a test bed for your own exploration and "play" with solving problems. For example, I'm a nerd for optimizing algorithms and for practicing Java-style (not Smalltalk-style) object-oriented programming (OOP). So sometimes I'll find a way to optimize the LC problem in an interesting way. Or I'll deliberately use an OOP approach. Here are a few examples from the past week of me doing things like this on LC. Maybe it'll inspire you to hone your own particular interests in some way.
https://leetcode.com/problems/search-a-2d-matrix/discuss/1977268/java-0ms-beats-100-uses-custom-pseudoarray-class-that-turns-matrix-into-array https://leetcode.com/problems/search-a-2d-matrix/discuss/197...
https://leetcode.com/problems/find-the-distance-value-between-two-arrays/discuss/1974248/java-2ms-beats-995-decompose-abs-into-comparisons-against-precomputed-arrays https://leetcode.com/problems/find-the-distance-value-betwee...
https://leetcode.com/problems/count-sub-islands/discuss/1974436/java-beats-5-uses-object-oriented-approach-custom-classes-for-island-and-cell https://leetcode.com/problems/count-sub-islands/discuss/1974...