Tip: If a question is too hard, and you're not having fun, skip it.

I'm reviewing some random medium problem lists for an upcoming interview and some of the problems I've done in the past are actually really hard. I learned nothing from some of them because there were just too many new concepts at once, especially as a beginner with < 100 problems seen.

As a noob I saw this
https://leetcode.com/problems/encode-and-decode-strings/
and spent probably way too much time on understanding how the given solution worked. However now I literally just do
https://leetcode.com/problems/encode-and-decode-strings/discuss/1814177/Python-Easy-encoding-by-string-length
and in retrospect solving the above problem has not helped me in the slightest in increasing my understanding of other, more difficult problems.

Here's a problem that wrecked me because I did it before I even understood a normal binary search on a normal sorted array:
https://leetcode.com/problems/search-in-rotated-sorted-array/
It would've increased my retention to understand the details of binary searches first, because back then it looked like magic.

tl;dr if a problem you're solving is difficult and it feels like you're learning a trick that you won't possibly see elsewhere, then just skip it. If the trick is common then you'll come back upon it anyway and probably decide to learn it then. It's also possible that the problem is actually just hard and you should learn other things then come back later so that you learn 1 thing at a time.

Comments (1)