Red-Green-Code

Deliberate practice techniques for software developers

  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter

LeetCode Tip 46: Are You Improving?

By Duncan Smith Nov 22 0

LeetCode 2023

LeetCode encourages you to develop a daily LeetCode habit. Every day, they identify one of their problems as the Daily LeetCoding Challenge problem. If you solve that problem, you extend your daily streak. If you don’t, your streak resets to zero. This gives you a reason to open the site every day and solve the daily problem.

But while it’s possible to learn something by following this daily habit, you won’t keep getting better forever. Eventually, a daily habit will only maintain your current skill level. To improve further, you need a different approach.

To learn more about the ideas in this tip, see Which Works Better: Habits or Projects? by Scott Young.*

Regular practice is necessary for improvement, but it isn’t sufficient. The path of least resistance in daily practice is to repeat skills that you already know. This type of practice isn’t useless. You’ll at least avoid losing those skills. But you won’t get any better.

To improve your skills rather than just maintaining them, you first have to find a strategic area to improve. Your practice journal should have some suggestions. Find a problem you have practiced before and check your most recent notes. Unless you have mastered the problem, your practice notes should identify a part of the problem that you had trouble with. If you work on something that you found difficult in your last repetition, then you have a chance of improving.

Improvement requires more effort and attention than just practicing every day. You have to analyze your performance and figure out what gave you trouble. And it isn’t always obvious what to work on. For example, let’s say you practice a problem that requires binary search and you correctly identify binary search as an appropriate algorithm, but you can’t figure out how to use binary search for this specific problem. You know how to implement binary search, so that’s not what you need to work on. You know enough about what a binary search problem looks like that you selected the right algorithm. But something about the application of binary search still eludes you. You have to figure out what that is, so you can learn and practice it. This analysis takes time, but it’s necessary.

Sometimes a daily habit can block improvement. If you implement an algorithm many times over many days and weeks, you’ll eventually stop thinking about the individual steps. It will be so easy that your fingers will just implement it on their own. This is useful for easier problems. It lets you finish those problems quickly. But harder problems may require you to modify the algorithm in subtle ways. Rather than thinking of the algorithm as a black box, you’ll have to take it apart and look at each step, the way you did when you were first learning it. You may have to unlearn habits if they are preventing you from understanding the algorithm well enough to apply it to hard problems.

If you’re practicing LeetCode regularly, take some time once in a while to ask yourself if you’re improving, or just practicing.

This year, I’m publishing a series of tips for effective LeetCode practice. To read the tips in order, start with A Project for 2023.

Categories: LeetCode

Prev
Next

Stay in the Know

I'm trying out the latest learning techniques on software development concepts, and writing about what works best. Sound interesting? Subscribe to my free newsletter to keep up to date. Learn More
Unsubscribing is easy, and I'll keep your email address private.

Getting Started

Are you new here? Check out my review posts for a tour of the archives:

  • 2023 in Review: 50 LeetCode Tips
  • 2022 in Review: Content Bots
  • 2021 in Review: Thoughts on Solving Programming Puzzles
  • Lessons from the 2020 LeetCode Monthly Challenges
  • 2019 in Review
  • Competitive Programming Frequently Asked Questions: 2018 In Review
  • What I Learned Working On Time Tortoise in 2017
  • 2016 in Review
  • 2015 in Review
  • 2015 Summer Review

Archives

Recent Posts

  • Do Coding Bots Mean the End of Coding Interviews? December 31, 2024
  • Another Project for 2024 May 8, 2024
  • Dynamic Programming Wrap-Up May 1, 2024
  • LeetCode 91: Decode Ways April 24, 2024
  • LeetCode 70: Climbing Stairs April 17, 2024
  • LeetCode 221: Maximal Square April 10, 2024
  • Using Dynamic Programming for Maximum Product Subarray April 3, 2024
  • LeetCode 62: Unique Paths March 27, 2024
  • LeetCode 416: Partition Equal Subset Sum March 20, 2024
  • LeetCode 1143: Longest Common Subsequence March 13, 2024
Red-Green-Code
  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter
Copyright © 2025 Duncan Smith