Puzzles
Isolate the skill
Solve a bounded problem, submit against hidden tests, and get production-grade feedback on correctness, performance, allocations, database plans, structure, or security.
Try a puzzle →The proving ground for .NET developers
Use focused puzzles to sharpen individual skills today, then preview guided Labs for applying production patterns in working projects. Katabench runs your code on real infrastructure and returns executable feedback you can trust.
No account needed to solve. See how it works →
Every submission is measured like this, per test, server-side, unspoofable.
Two ways to practice
Train one engineering skill at a time, or follow a structured course through executable projects. Both make you write the code and prove the result.
Puzzles
Solve a bounded problem, submit against hidden tests, and get production-grade feedback on correctness, performance, allocations, database plans, structure, or security.
Try a puzzle →Katabench Labs
Preview 2 courses with 17 focused labs and 107 lessons. Live Aspire and microservice workspaces remain in private beta while the production lab host finishes validation.
Preview Katabench Labs →The disciplines
Algorithm drills are the smallest part of the job. Each discipline trains a different fundamental of the craft, and each has a grading engine built for it.
Classic problems where correct is only halfway: hidden 200,000-element gates time out the O(n²) pass, and allocation budgets (measured by the GC, not estimated) fail the copy-happy one.
LINQ against a real PostgreSQL database. The grader captures the execution plan the engine actually chose, and grades it. Kill the N+1, earn the index scan.
Inherit working-but-awful code (including the famous Gilded Rose) and clean it up. Roslyn measures complexity, nesting, duplication, and method length while every test stays green.
Multi-file katas graded on design itself: dependency direction, layer isolation, extracted interfaces, sealed types. A wrong dependency fails the same way a failing test does.
Fix vulnerable-but-working code against real attack payloads: path traversal, SQL injection, SSRF, open redirect. Block the exploit without breaking the feature.
Small katas on the principles behind the patterns: make a value object truly immutable, seal an aggregate's invariants, invert a dependency. Graded on structure, not just behavior.
You write the tests. Your suite runs against a correct implementation and a set of planted-bug mutants, and passes only when it catches enough of them. Coverage that has to actually detect bugs.
374
graded puzzles and counting
Every one with a gate that green checkmarks can't fake, and new puzzles ship with every release.
Exhibit A
Submit LINQ and we run it on a real PostgreSQL instance seeded with tens of thousands of rows, capture the execution plan the engine actually chose, and grade the plan itself. Getting the right rows the wrong way is a visible, gradeable mistake here.
The obvious filter
.Where(o => o.PlacedAt.Year == 2024 && o.PlacedAt.Month == 3)
Sort (by id)
└ Seq Scan on orders
~60,000 rows · ⚠ full table read
✗ 1 / 3 plan rules hold
The sargable rewrite
.Where(o => o.PlacedAt >= start && o.PlacedAt < end)
Sort (by id)
└ Index Scan using ix_orders_placed_at
~1,017 rows · ✓
✓ 3 / 3 plan rules hold
Same rows returned. Same green tests. Only one earns the index scan, and the grade.
The plan comes from the database that just ran your query on realistic data, not a simulation, not a guess.
Full-table reads called out in red, index usage in green, row estimates on every node, even on hidden tests.
No full-table scan, must use the index, one round-trip: pass/fail rules evaluated against the captured plan.
Seven tracks, Easy to Hard. Each puzzle states the goal, the constraints, and the bar you have to clear: a time budget, an allocation ceiling, a plan rule, a design rule.
Write C# in a full Monaco editor with syntax-aware highlighting and completions. Run visible sample cases (or your own custom input) and iterate fast.
Your solution faces the full hidden suite. Per-test wall-clock time, a time-budget bar, allocated bytes, captured SQL with its query plan, and a character-level diff on every failure.
Your code runs server-side in a hardened, network-isolated sandbox, resource-capped, unprivileged, and destroyed after every run. See exactly what happens →
Guided Learning Paths
Follow a deliberate sequence across algorithms, data access, refactoring, architecture, and secure coding. The path supplies the curriculum. Katabench still makes you prove every step against real correctness, performance, query-plan, and structure gates.
Database and EF Core
High-Performance Data Access
The grader
One grader, five kinds of judgment. Every dimension is measured where it can't be faked.
Every test reports server-measured elapsed time against its budget plus managed-heap allocations, median of repeated runs, so a GC pause can't flip your verdict. Some puzzles set hard budgets: a 100 KB input under a 16 KB allocation ceiling forces the in-place solution.
Database puzzles run on a real PostgreSQL instance seeded for your submission. Expand any test to see every SQL statement your LINQ produced, what it cost, and the plan the engine chose.
Refactoring katas parse your source and measure it: cyclomatic complexity, nesting depth, method length, duplicate blocks. The tests stay green, the mess has to go.
Dependency direction, layering, abstractions, and sealed types are verified on every submission. A wrong dependency fails the grade, not a code review three weeks later.
Secure-coding puzzles run a second, adversarial suite: traversal strings, SQL-injection payloads, forged log lines, SSRF probes at the cloud metadata endpoint. Exploits blocked and behavior preserved. Both, or no pass.
Give up gracefully: load a correct, optimal reference solution into the editor, study it, then reset and try to beat it from memory.
Learning Paths give you the route. The proving ground makes you apply it, defend it, and earn the progress that shows it stuck.
You watch
Great for absorbing new concepts, but nothing measures whether you can actually apply them under constraints.
You pass
Binary right/wrong on correctness, optimized for getting hired. An O(n²) pass teaches the wrong lesson.
You get sharper
Graded on the qualities production actually judges, so what you practice here transfers to the job. Progress reflects proof, not time spent watching.
Learn concepts anywhere. Prove the skill here. Built by a working .NET engineer and educator, for the engineers who want their practice to count.
Start free, no credit card. Go Pro when you want the whole craft under the grader, not just the algorithm track.
$0/mo
Everything you need to get hooked. No credit card.
$19/mo
The full proving ground: every premium track, every gate, no daily cap.
Pick a puzzle, press Run, and see how fast your code really is. Then make it faster.
Start solving, it's freeA short note when fresh kata land, plus the C# and performance tricks behind the grading. No spam, unsubscribe anytime.