← Back to all posts

Leetcode and Discipline

March 30, 2025 | rb

Leetcode is a skill I promised myself I'd be consistent with in 2025. Through this, I've learnt so much about not only problem solving and DSA, but also a broader lesson about staying disciplined and keeping yourself accountable.

The motivation behind it

During my stay in Ottawa for coop, I found myself with a lot of free time. But it felt different compared to when I was at school or home. There weren't as many people I could reach out to, not as many restaurants I could eat at (I miss good chinese food!) and frankly just not as much to do. Outside of work hours, after maybe eating with some friends or going to the gym, I was bored.

Winter in Ottawa is pretty brutal too. I think for a month straight we had -20C weather with windchill and for the first time in my life I had to drive with gloves on (no heated steering wheel unfortunately). So that completely ruled out many outdoor activities except for the couple of times I went skiing. Regardless, I had a burning feeling that I needed to do something to improve one way or another.

That's when I turned towards Leetcode. I knew it was something that I needed eventually if I wanted to achieve my personal career goals. I also just wanted to improve my critical thinking and problem solving skills by challenging my brain with something it wasn't used to.

Taking the leap of faith

I think what caused me to put off LeetCode for so long was seeing the mountain I had to climb. I remember in first year when I saw all upper years getting insane coops (Citadel, Databricks, etc!) and talking about the number of Leetcodes they solved. They showed me the questions they were asked (like this 💔) and I'm not gonna lie, I was absolutely clueless.

It felt like an uphill battle. I began to wish I was in their position, already knowing how to solve these problems and having confidence walking into technical interviews. The main realization that shifted my mindset, however, was the fact that nobody was ever born an expert. The people I looked up to at one point were in my position. The only difference was that they started

At one point, just like me, they decided that enough was enough. There was no use in wishing. The only way to get where they wanted to be was to do. That was the only way to get better. Day by day my progress may look minimal, but scoped over a couple months or a year, I will have become the person I looked up to.

What it taught me about discipline

I think this idea - showing up, staying consistent and letting results follow - is applicable to any other part of my life. Want to get stronger? Stay discplined in the gym. Want to get better at soccer? Stay disciplined on the field. Want to be healthier? Stay disciplined in the kitchen. Frankly, these are all habits that I'm still building but Leetcode definitely laid out a structured foundation to continue chipping away at these goals.

On a related note, this brings me to the idea of delayed gratification, a topic discussed in Atomic Habits by James Clear (as popular as it is, it is a great read). The book describes how habits worth building often fail because the costs are in the present while the rewards are in the future. Our brains crave dopamine. This is why the urge of eating something unhealthy oftentimes overpowers the discomfort of pushing yourself in the gym. Or the temptation of scrolling reels overpowers the boredom of studying. The book argues that the habits worth building are the ones that require embracing delayed gratification. The ones where staying discplined now will reap its rewards later even if D2D progress may seem minimal.

Reflecting on this also brought another unusual and, at a surface level, unrelated connection to my mind. Kinematics. Remember in high school physics when you were learning about friction? Specifically static and kinetic friction? The idea that an object requires more force to start moving from rest (static) than it does to keep moving (kinetic) once it's already in motion. That concept struck me - not necessarily as a physics principle, but as a metaphor for change. Starting something new, whether a habit, project or mindset shift often feels disproportionately difficult at first. However, once you show up and start, you've already fought 80% of the battle.

Staying consistent

I think the idea of improving any aspect of your life can be boiled down to something much simpler. Just showing up. And the thing is that Leetcode made it easy... too easy. With daily questions, company tagged questions and the Neetcode roadmap, there was no excuse for me not to be doing at least one a day. My goal was 3-5 new questions, but at least 1 was non-negotiable.

Neetcode helped a lot too. When I was initially learning, his content helped me unlock completely new sets of problems. His roadmap gave me direction whenever I felt lost or unsure of what to learn next. Without him, I might've been doing DP before two pointer.

The idea here was that in order to stay consistent, I had to make it easy for myself to do so. Whether it be a roadmap, doing the daily, randomly picking a tagged question from a company I love or doing the weekly contests, there was always a way for me to shut my brain off and pick a question to do. If staying consistent bridges you to your goals, you might as well make it as easy as possible.

Results, Takeaways and TLDR

I'm still in the middle of my journey. There are topics that I find profoundly unintuitive, questions I solved that need intense review and overall a long way to go in terms of my initial approaches. I found that I paradoxically felt less confident after 400+ problems solved than when I was at 150. After my initial growth slowed I began to focus on what I was missing rather than what I was learning. I started to overthink the scope at what I might be asked in an interview. Whether I could "one-shot" certain problems rather than solve them through multiple trials and errors. These are all normal feelings I've come to realize and that all that mattered is that I am a better programmer than I was yesterday.

Leetcode has had its positive impacts too. Outside of code, it's made me a more consistent meal prepper and gym goer. It's allowed me to find like-minded friends who also decided to start something daunting. And the most important thing was that it made me confident as a programmer.

After countless mock interviews with my friends and fellow engineers, I wanted to push myself and schedule a mock interview with James Peralta - a quickly growing Youtuber who focused on career development for SWEs (check him out!). The mock interview went well and I felt stood as a testament to my growth. Just 6 months ago I didn't know what sliding window was and 3 months ago you could probably run a kilometer before I could implement a basic matrix DFS. You can watch the mock interview on Youtube here! <-

In the end, it wasn't just about solving Leetcode problems. Rather, it was about proving to myself that I could show up every day for something hard. That mindset bled into every part of my life and prompted reflection into self-improvement as a whole. And for that, I'm grateful.

TLDR

  • Leetcode is hard, but its necessary
  • No one was ever born an expert. To quote "the master has failed more times than the apprentice has tried"
  • Delayed gratification can be your worst enemy or your greatest asset, those who conquer it will be the best at what they do
  • Break up a long term goal into something manageable that you can work on daily. And make sure you show up
  • Being consistent is often the hardest part. Make it easier for yourself by reducing the friction at becoming better at whatever you are developing

Thanks for reading :). This will be first of I hope many writing pieces I work on during my career. Through writing I hope to anchor some of the thoughts I have that I think are worth keeping and sharing and I hope they can provide value to others