A Year of LeetCode
Interview with someone who's fresh off a 365-day streak on LeetCode. Myself!
I know what you’re thinking: who does this guy think he is, interviewing himself? Does he think that’s clever? Well, yes, I think it’s at least a little clever. I wanted to structure the post as a series of questions and answers, but it would be disingenuous to call it FAQ, since we both know that none of these questions get frequently asked. So instead it’s a staged interview! Hope you enjoy.
❓Interviewer Miorel: Welcome to the studio, Miorel, it’s great to have you here.
❗Interviewee Miorel: Thank you for having me, Miorel, it’s great to be here.
❓IM: So, a year of LeetCode, eh? What does that mean, exactly?
❗IM: I’m assuming you’ve heard of LeetCode, it’s a coding practice website, usually associated with interview prep. It also has a problem of the day feature. As of not too long ago, I’ve submitted an accepted solution to the problem of the day for 365 days in a row.
❓IM: Congratulations! You must be very happy with this achievement.
❗IM: I am. As many of my friends know, I’ve been obsessed with habit-building over the past year. It feels good to have been consistent in a habit for an entire year.
❓IM: Were you planning to do it for a year going into it?
❗IM: Definitely not. At first, I just wanted to get one of the monthly badges. You get one by solving all the problems of the day in a particular month. I decided to try for the May 2022 badge. It was mid-April 2022 when I got this idea, and I was even sad that I hadn’t thought to do it a bit sooner — the April badge would have required one less problem! In any case, I went for the May badge, and I was able to get it. It then felt easy enough to keep going and try to get the June badge too.
As the marginal appeal of getting one more badge started to wear off, I expected I’d naturally stop at some point, but I didn’t. So as one month became two, then three, it eventually became clear that a year was doable!
❓IM: So you had to solve a new problem every day for a year?
❗IM: Not exactly every day, actually. On some days, the problem of the day would be a problem I had already previously solved. LeetCode doesn’t automatically count the old solution, so I’d still have to resubmit, though of course that doesn’t take very long. If I felt especially motivated, I’d solve the problem again from scratch, or try to write a solution in a new programming language. But many times I just enjoyed having a freebie day 😊
❓IM: What did you do when the problems were very hard?
❗IM: One nice thing about LeetCode is the discussion pages for each problem. So you always have the safety net of being able to look at the ideas or code shared by others. If I worked on a problem for a while and felt like I wasn’t making progress on my own, I’d get some inspiration from the discussions.
❓IM: Isn’t it cheating to look at others’ solutions?
❗IM: Not at all. Consider two scenarios. In Scenario 1, you encounter a challenging problem. You give it an honest try, but you’re not getting anywhere. You continue to not know how to solve the problem. In Scenario 2, you encounter the same problem, but after trying it for a while you decide to look at someone else’s solution. Armed with this information, you are now able to solve the problem.
If you ask me, Scenario 2 is much better, because you learned something, and after all, learning is the goal of all this. You can confirm that you learned something by trying to write your own solution from scratch, without keeping the solutions that inspired you in view.
But even if you have to transcribe another solution character by character, I still think it’s worth it, if that’s what it takes to maintain your problem-solving streak.
❓IM: Why is the streak so important?
❗IM: I’m sure you’ve experienced the incredible inertia of streaks. I certainly have. That’s why this video summary of the Atomic Habits book hit so close to home. I used to think that more willpower was the solution to everything, but that makes success hard by definition. I’m now fully bought-in to the idea of making success feel easy and inevitable, and part of that is creating positive feedback cycles.
“Every day I’m going to work on the LeetCode problem of the day” is a clearly-defined habit that reinforces itself every day that you stick to it. If you tell yourself something like “I’m going to work on the problem of the day, except on days when it’s too hard or when I have other things to do”, then you’re already giving yourself an excuse to be inconsistent. It becomes easy to start a streak of skipped days, and that streak can reinforce itself too.
So rather than skipping days, decrease the bar for what it takes to keep the streak going. Keep decreasing it until it sounds ridiculous. If it’s not ridiculous, then it’s still too hard. For example something like “I will think about the problem for one minute, then I will go read solutions”. This isn’t meant to be what you do every time, but having an easy option available is how you convince your brain to begin the task rather than postponing it to some distant better future time. In this way you can build positive momentum even on days that are difficult.
❓IM: What about vacations? Did you take any time off in the last year?
❗IM: I had an extended vacation in August and September, mostly centered around going to the US Open for tennis. You’ll see in my submissions table that I had fewer submissions in those months, but I was able to keep the streak going. By this point I had formed a pretty strong LeetCode habit, so I’d naturally be excited to check the problem of the day when it came out, and I’d think about it a bit even while I was away from a laptop computer. I’d write up my code when I got back to the hotel, after a day of watching tennis, or the next morning, before heading back to the courts.
❓IM: Were there days when it was difficult to even get to a computer?
❗IM: Not during the US Open vacation, but I did write out one solution on my phone. I was at a music festival, and frankly I Leetcoded on my phone more for fun than out of strict necessity. I would have been able to get to a laptop computer in time. Fortunately it was a straightforward problem with a relatively short solution, so I got the chance to pull off a fun stunt while waiting for the next musical performance!
❓IM: So are you going for year 2?
❗IM: I’m definitely planning to keep up the habit of daily problem-solving! However I’m not explicitly planning to try for a 2-year streak of LeetCode problems of the day, just like I didn’t plan for a 1-year streak until the finish line was in sight. For now I’m still solving the problems of the day (or resubmitting my old solutions) so we’ll see how far that goes. As far as LeetCode is concerned, I’m also excited for some new challenges.
❓IM: What new challenges are you taking on?
❗IM: I’m most excited to help more people develop a regular problem-solving habit! I’ve already had the pleasure of working with the CSUMB Programming Team this spring, and I’m looking forward to kicking off another cohort of problem-solvers in the summer. Each person will be working on problems appropriate for their experience level, and we’ll be supporting each other with coding advice, fun stories, and group motivation. Please reach out if you’re interested!
❓IM: Thanks so much for visiting today and answering some questions!
❗IM: It was my absolute pleasure — you made me feel right at home.
❓Interviewer Miorel: That’s because we’re the same person.
❗Interviewee Miorel: Right. I was hoping we weren’t gonna bring that up again.
❓Interviewer Miorel: Let’s end this before it gets any more awkward.
❗Interviewee Miorel: Ok, bye!!
Thanks for indulging my vanity and getting all the way through this interview! Are there questions you wish I had answered? Do you want to know more about the problem-solving group that I casually mentioned at the very end? Comment here or email me at codechronicles@substack.com. I’d love to hear from you!




"I was hoping we weren’t gonna bring that up again." LOL! Great job on the streak. This is inspiring me to track something myself.
Nice one Miorel. interested in learning more about the problem-solving group!