← Essays
·5 min read

Kata: a pattern-first way to drill for coding interviews

Why I built another LeetCode clone, and why it isn't really about LeetCode.

It is no secret that a part of this industry loves LeetCode-style interviews. As someone who's been in the industry a while, I see them as an annoyance that skews towards the fresh college graduate who has time to grind for months. They are unavoidable if you want to work for a certain tier of company, many of which view them as a cultural signal.

I've been interviewing again, which means I've been back on the usual treadmill: open a random problem, stare at it, half-remember a technique from three weeks ago, eventually solve it, then move on and forget it happened. After enough of that I realized the actual failure mode isn't "I don't know enough problems." It's that I never built a system for holding onto the handful of ideas that make most problems solvable in the first place.

That's the whole premise behind Kata, the project I've spent the last few days building: interview coding problems are pattern recognition, not trivia. Two pointers, sliding window, binary search on the answer, backtracking, dynamic programming on a shrinking state. There are maybe a dozen recurring moves. Once you can see which move a problem is asking for, the problem stops being scary. The job isn't to grind three hundred problems. It's to memorize the dozen ideas well enough that recognizing them becomes automatic.

So Kata is a small, personal trainer built around that thesis, and around the idea that patterns deserve to be first-class citizens rather than tags bolted onto a problem list.

Two ways to work a problem

Practice Mode is the part that looks like every other coding practice site: pick a problem, write code in an editor, run it against the test cases, submit. Nothing revolutionary there, and it doesn't need to be.

Stepwise Mode is the actual reason the project exists. Instead of dropping you cold into an empty editor, it walks a problem in four phases:

  1. Frame. Show the prompt, and name the governing pattern up front, with a line explaining why it fits. The goal is training the recognition trigger itself, not just the solution.
  2. Guided walkthrough. The solution is broken into steps. Before each one is revealed, you're asked to predict it. Then you see the explanation and the code increment. Predicting before reading beats just reading, which is one of the more reliable findings in how people actually learn.
  3. Faded practice. The walkthrough comes back with key steps blanked out, so you have to supply the reasoning you just watched, rather than just recognizing it.
  4. Independent solve. Back to a blank editor, starter signature only, full test suite. If you can get here and pass, you've actually learned it.

Passing the independent solve triggers a spaced-repetition review, scheduled with FSRS, the same algorithm family that powers most modern flashcard apps. The unit being reviewed is the pattern itself, not the specific problem, because the pattern is the transferable part. A due-review queue and a streak tracker exist mostly to keep me honest about actually coming back.

Where the content came from

Kata currently has ten patterns and thirty problems, each one written from scratch rather than pulled from anywhere. Every solution runs against its own tests in both JavaScript and Python before it ships, so "the walkthrough is correct" isn't something I'm taking on faith.

The one feature I went back and forth on before building was company-targeted prep: pick a company you're interviewing with and get a study plan weighted toward the patterns it tends to emphasize. I wanted this without crossing into the thing that makes a lot of interview-prep content ethically murky, which is scraping someone else's tagged problem lists or paywalled data. The way it actually works is that each company has a small, openly reasoned file describing pattern emphasis and difficulty skew, based on general, widely known interview-prep reputation, and that gets mapped onto Kata's own original problems. No scraped lists, no lifted content, just weights applied to a plan generator.

Along similar lines, problems now link out to further reading on sites like NeetCode and LeetCode when a genuinely useful explanation exists elsewhere. Linking to someone else's material is a normal, healthy thing for an educational site to do. Copying it isn't. I kept those two ideas deliberately separate the whole way through.

The unglamorous parts

All code execution happens in the browser, in web workers, including Python via Pyodide, so there's no backend running untrusted code. It's Next.js, Postgres, Drizzle, Better Auth for sign-in, CodeMirror for the editor. None of that is the interesting part of the project, but getting a WASM Python interpreter to behave correctly inside a Turbopack-bundled worker took longer than I'd like to admit.

It's live now at kata.zadell.com, and the name is a deliberate echo of the martial-arts sense of the word: a drill you repeat on purpose, until the form is automatic and you stop having to think about it. That's the whole bet. Not more problems. Better repetition.

by Zac