ZH/zhe hang
← Work index

04 ·automation tool ·2026

LeetCode TrackR

A daily job that logs every solved LeetCode problem into Notion and schedules it for spaced-repetition review.

Facts

  • runs daily, unattended
  • Leitner spaced repetition
  • 508 solves tracked
  • no server to host

Built with

  • Python
  • GitHub Actions
  • Notion API
  • LeetCode GraphQL
  • Claude API

Links

LeetCode TrackR logs every problem I solve into a Notion tracker and decides, on its own, when to put it back in front of me to review.

Inspiration

As a student, I credit much of my academic success to two habits: spaced repetition and active recall. They were simply the best way for me to revise. When I started on data structures and algorithms, I wanted to study them the same way, but two things got in the way. Solving a question once did not make it stick, so a near-identical question weeks later would send me back to square one. And keeping track of which topic and subsection of DSA to revisit next was a chore in itself.

Spaced repetition fixes the forgetting. I wanted that same discipline for algorithms, without hand-building and scheduling every card myself. LeetCode TrackR grew out of wanting the review to run itself, and to do the headache work for me.

What it does

A GitHub Actions cron runs daily, pulling my latest accepted submissions from LeetCode’s GraphQL API. For each one it records how I approached it: my first intuition, why that intuition was wrong, what actually worked, and what I optimised. Then it assigns a Leitner interval and sets a Next Review date. A Notion view filtered to “due today” becomes my revision queue, so the problems I am about to forget come back first.

Give it an Anthropic API key and it will also have Claude draft a two or three sentence summary of the method and complexity for each solve. Without a key there is no summary; it still logs everything and leaves the notes to me.

Inside the log

Below is a rebuild of my Notion tracker. Click any row to open that solve: its properties, the auto-generated approach, and the submitted code.

LeetCode Log

Auto-populated log of accepted LeetCode submissions. Each row links to one problem; the page body holds the submitted code, an auto-summary of the approach, and a notes section.

Click a row to open the logged entry →

Design choices

  • Runs daily. It runs entirely on GitHub Actions, on a cron fired at 01:00 UTC.
  • Zero-config to start. It works off a public LeetCode username alone. Add a session cookie and it also pulls the submitted code, runtime, and memory.
  • Prevents duplicates. Dedup is by problem number, so re-solving a problem updates the entry instead of creating a duplicate.