Hacker News new | ask | show | jobs
by hiAndrewQuinn 918 days ago
I put an href on the front side of the card to the problem, and most of the time actually clicked through and redid the problem from scratch (making sure to avert my eyes while I deleted LC's copy of my last attempt). If I felt particularly lazy or confident, I would just mentally sketch out the solution.

Worth noting I also became much more adept at things like list comprehensions and using Counters and DefaultDicts in Python this way. When you type out a solution over and over like that, your brain naturally wants to chunk things down as much as possible.

1 comments

Interesting. I have seen public decks of Leetcode questions that had a summary of the solution for each problem, but I've never heard of this take.

I'm tempted to try it for my self. Did you only include problems that you solved previously?

No. In fact, I had never solved a Leetcode problem before. Every time a card came up that I had never attempted before, I simply flipped it over and typed in whatever answer was on the other side - but only the first time. Each other time I would try to remember as much of the solution as I could.

Eventually I got good enough that I started naturally thinking up solutions to entirely new problems without having to check the answer first, which is what one would expect if they were building new crystallized intelligence by practicing earlier problems.