Red-Green-Code

Deliberate practice techniques for software developers

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

LeetCode Tip 17: What To Write in Your Practice Journal

By Duncan Smith May 3 0

LeetCode 2023

A key part of effective LeetCode practice is keeping a practice journal. Although LeetCode automatically tracks your solution submissions and can show you your previously submitted code, a journal gives you a more customized record of your practice sessions. You can use this to focus on the areas you need to study most.

In its most basic form, a practice journal is a list of time-stamped entries at the bottom of your model solution document. Whenever you repeat a problem, add the current date and some information about your practice session. At a minimum, write one sentence explaining the result. For example, “Solved it easily” or “Solved most of it, but got stuck on a few edge cases” or “Off by one in the binary search.” Then, if you find yourself repeating the same comments the next time around, you know where to target your practice efforts. Even a small journal entry like this will help. But with a few additional minutes after each repetition, you can get even more out of your journal. Here are two categories of notes to include.

First, you can record spreadsheet-style data. It’s best if you use an actual spreadsheet for this, so you can write formulas to calculate some fields automatically. Some ideas for what to record:

  • Timestamp: When you practiced.

  • Practice time: How long you spent solving the problem. You should observe this time decreasing as you get better at a problem.

  • Days between repetitions: Calculate the number of days since the last repetition. Use this with your spaced repetition system to ensure that you’re practicing at the correct intervals.

  • Next practice interval (days): Decide what amount to put in this field based on how well you did for the current repetition. The more easily you solved the problem, the higher the number can be.

  • Days remaining until next interval: Calculate this field and use it to find a problem that’s ready to practice (pick the problem with the smallest number).

  • Accepted on first run (yes/no): Record whether you got the problem on the first try, or whether it took a few tries. For a canonical problem that you want to master, the goal is to learn it well enough that you don’t have to rely on the compiler or the unit tests to guide you in the right direction.

Besides the spreadsheet entries, free-form journal entries are also useful. The goal of this type of section is to self-evaluate how well you know a problem and which areas are giving you trouble. Include notes about any areas where you got stuck, even if you ended up solving the problem successfully. These notes can help you polish your model solution, turning it into a solution that is exactly customized for you. You can also find problem areas by looking for bugs that show up repeatedly in your journal entries. This is more efficient than going through previous code submissions.

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