Features

Everything a practice site does, in your terminal

cstudy picks the next problem, scaffolds it in your language, runs your code, reveals hints and solutions, measures performance and tracks your progress. Here is what each part does.

01 Languages

6 languages, each a real project

A workspace holds one ordinary project per language. cstudy writes your stub into it and runs it with that language’s own toolchain, so your language server, formatter and debugger work without extra setup.

Languages, their workspace projects and problem counts
LanguageIn your workspaceToolchainProblems
Pythonpython/ with uv; pyright, ruff, debugpy and pytest as dev toolsuv and Python 3.13239
TypeScripttypescript/ with pnpm; Node runs your .ts files with type strippingNode 24 and pnpm235
Javajvm/java/, built with the Gradle wrapperJDK 21, Gradle wrapper240
Kotlinjvm/kotlin/, built with the Gradle wrapperJDK 21, Gradle wrapper240
Gogo/, a Go module; go.work at the root for goplsGo 1.24 or newer237
Rustrust/, a Cargo package; each problem is its own crateRust 1.80 or newer, via rustup236

Pick a language per problem with --lang, or set default_lang in ~/.config/coding-study/config.toml. Reviews are scheduled per problem, not per language: solve a problem in Kotlin today and review it in Rust next week.

02 Tracks

Practice for the rounds beyond algorithms

Algorithms are one part of a senior or staff loop. The catalog also covers practical coding, low-level design, concurrency and debugging, with prompts for system design and code review.

Tracks in the catalog
TrackItemsGraded byWhat you practise
Data structures and algorithms196Tests, in every languageFunctions and data-structure designs across 23 patterns
Practical28Tests, level by levelOne class whose API grows over levels, a project folder, or a business task with money and dates
Low-level design8Tests, then a design rubricObject-oriented design
Concurrency6Stress tests against invariantsThread-safe classes, with a concurrency model per language
Debugging16TestsBuggy code to fix, including bugs that exist only in Go or Rust
System design10Yourself, with a rubricA prompt, a notes template and a reference design
Code review6Yourself, with a rubricA change to review, and the issues a strong reviewer finds

Problems in several shapes

Most problems ask for one function or one class. Progressive problems grow a class over levels; concurrent problems are checked by stress runs against invariants; debugging problems hand you buggy code to fix; project problems give you a whole folder to extend.

How each kind of problem works

Problems of your own

cstudy new scaffolds a problem in your workspace from a template, and cstudy verify checks its statement, tests and reference solutions. Your problems join the catalog for every command.

Writing your own problems

03 IDE and debugging

Your editor runs cstudy. Your debugger stops in your code.

cstudy init writes project files for VS Code and IntelliJ IDEA with a task or run configuration for every action, on the file in the editor or on the active attempt. Any other editor works through $VISUAL or $EDITOR.

cstudy test --debug runs the normal judged run under the language’s debug agent and waits for your IDE to attach. Breakpoints in your file stop the real runner, time limits are off, and the verdict arrives when the run ends.

Debug agents and default ports
LanguageDebug agentPort
Pythondebugpy5678
TypeScriptNode inspector9229
Java, KotlinJDWP5005
GoDelve2345
Rustdebugserver (macOS) or lldb-server (Linux)12345

VS Code gets launch configurations for Python, TypeScript, Java, Go and Rust; IntelliJ IDEA debugs Java and Kotlin. Editors and debugging

the line your IDE waits for (standard error)
cstudy: waiting for debugger on 127.0.0.1:5678 (python)
cstudy: waiting for debugger on 127.0.0.1:9229 (typescript)
cstudy: waiting for debugger on 127.0.0.1:5005 (java)
cstudy: waiting for debugger on 127.0.0.1:2345 (go)
cstudy: waiting for debugger on 127.0.0.1:12345 (rust)
cstudy: connecting to debugger at 127.0.0.1:5005 (kotlin)

04 Complexity checks

Measured against a ladder of references

cstudy bench runs your code and every reference approach on the same generated inputs, in the same runtime, and places your solution on the problem’s complexity ladder with an explicit confidence.

terminal
$ cstudy bench
two-sum · python · sizes 1e2..1e5 · reps 7 · power AC · load 1.2

TARGET        DECLARED   n=1e2    n=1e3    n=1e4    n=1e5    SLOPE  BAND     MEMORY
brute-force   O(n^2)     0.21ms   19.8ms   2.04s    budget   2.00   ~n^2     constant
hash-map      O(n)       0.01ms   0.09ms   0.94ms   10.1ms   1.00   ~n|nlogn linear
you                      0.01ms   0.11ms   1.10ms   11.8ms   1.01   ~n|nlogn linear

verdict   optimal: matches hash-map, 1.17x at n=1e5 · confidence high (spread 3%, R^2 0.999)
space     linear, same as hash-map · confidence high
history   best previous 13.0ms at n=1e5 (2026-09-12) · now 9% faster · 1st of 3 runs

What the verdict means

  • optimal: the same growth band as the optimal reference, at most 1.5 times its time at the largest size, and a ratio that does not grow.
  • near-optimal: the same band, but the ratio grows with n, which usually means an extra log factor.
  • suboptimal: a worse growth band, or over the time budget where the optimal reference finished.
  • unknown: too few usable sizes, or no optimal reference in this language, to compare.

What it cannot tell

Slopes separate n from n² reliably, but not n from n log n, which cstudy judges by the ratio to the optimal reference and its trend. Constant, logarithmic and square-root growth share one band. Memory is reliable in Python and approximate on the JVM and Node.

Time limits for cstudy test reuse the same reference timings: --time-limit gives each case 5 times the reference’s time by default, so a brute force fails the large cases.

05 Spaced repetition and mock interviews

Reviews when they are due, mocks when you are ready

Every finished attempt gets a grade, and the grade decides when the problem comes back. cstudy next serves what is due first, then new problems from your weakest pattern.

From rating to next review

You rate an attempt easy, ok or hard. A hint caps the grade at ok; finishing over your time box, or a confident suboptimal bench verdict, caps it at hard; giving up or revealing the solution before passing grades it again.

6 reviews of one problem, from the scheduling spec
GradeNext review inEase after
ok3 days2.50
ok7 days2.50
ok18 days2.50
hard22 days2.35
again1 day2.15
ok3 days2.15

Mock interviews

cstudy mock starts new medium and hard problems from different groups with one shared timer, 45 minutes by default, and locks hints and solutions until the timer ends or every problem is done.

terminal
$ cstudy mock
mock interview · 2 problems · 45 min shared timer · python
1  group-anagrams  (medium · arrays-hashing)  weakest pattern: arrays-hashing (0.75)
   stub       python/practice/group_anagrams.py
   statement  .statements/group-anagrams.md
2  lru-cache  (medium · linked-list)  weakest pattern: linked-list (0.75)
   stub       python/practice/lru_cache.py
   statement  .statements/lru-cache.md
locked     cstudy hint and cstudy solution, until the timer ends or every problem is done
next       cstudy test group-anagrams --watch

Progress at a glance

cstudy stats shows your progress per pattern, track, language or difficulty: pass rate, median solve time, weakness, your streak and the reviews due.

terminal
$ cstudy stats
GROUP           PROBLEMS  ATTEMPTED  PASSED  MASTERED  PASS RATE  SOLVE TIME  WEAKNESS
arrays-hashing        17          5       4         1        80%     14m 10s      0.42
two-pointers          10          0       0         0          -           -      0.75
system-design         10          1       1         0       100%     45m 00s      0.30

attempts  6 finished · 5 in the last 7 days · streak 3 days
reviews   1 due today · 1 overdue
bench     4 benched · 2 optimal · 1 near-optimal · 1 suboptimal · 0 unknown

06 Offline use

On your machine, and offline

After the one-time toolchain setup, every command works without a network connection.

  • a.

    Everything ships with cstudy

    The problems, tracks and runners are part of the install. The libraries the Go and Rust runners need are vendored, so Go never downloads a module and Cargo builds with --offline.

  • b.

    One online step for the JVM

    cstudy doctor --fix runs a Gradle warm-up once, which caches the libraries that Java and Kotlin need, so later builds run offline.

  • c.

    Your progress is a file

    Attempts, reviews and bench runs live in progress.db, a SQLite file in your workspace. cstudy export writes them as JSON you can commit, and cstudy import restores them on another machine.

  • d.

    Your code runs as you

    Solutions run with your user’s permissions, under a hang guard that stops a run that never ends. cstudy is a practice tool, not a sandbox: it runs the code you write.

Ready to try it?

Install cstudy with Homebrew, then let cstudy doctor tell you which toolchains are missing.