Algorithms and performance
Solve familiar algorithm problems, then face inputs large enough to expose the wrong complexity and allocation budgets that punish needless copying.
Start free: Two Sum →Online C# practice, graded beyond correct
Write C# in the browser and get specific feedback on more than output. Katabench measures time and memory, captures database plans, checks code structure, and runs adversarial tests across 504 focused exercises.
No signup required for your first puzzle. Nothing to install.
✓ 2 more visible tests passed
Correct, fast, and allocation-aware: the result shows all three on the same submission.
Advanced C# exercises
The catalog starts with algorithms and keeps going into the work that fills an actual .NET codebase. Pick one discipline for focused reps or follow a guided learning path through a deliberate sequence.
Solve familiar algorithm problems, then face inputs large enough to expose the wrong complexity and allocation budgets that punish needless copying.
Start free: Two Sum →Write LINQ and SQL against real PostgreSQL. See every generated query, inspect the execution plan, and learn when the database did the wrong work.
Start free: Filter Before You Fetch →Clean up working C# while behavioral tests stay green. The grader measures complexity, nesting, method length, and duplication from your source.
Start free: Flatten the Null Checks →Work across multiple files and make dependencies point the right way. Architecture rules turn design boundaries into executable feedback.
Start free: Two Sides of the Hexagon →Repair vulnerable code without breaking its behavior. Functional tests and adversarial payloads both have to pass before the solution is accepted.
Start free: Comment Renderer (HTML Injection) →Write tests that catch planted bugs. A suite passes only when it stays green on correct code and turns enough faulty implementations red.
Start free: Test the FizzBuzz Rule →Practice immutability, invariants, dependency inversion, and behavioral patterns with executable structural checks on the result.
Start free: Ask for the Interface →Want an ordered data-access progression? Start with the LINQ exercises. For a broader sequence across disciplines, follow a guided C# learning path.
The feedback loop
Not only "did it pass?" but "what did the code cost, and would this solution survive the constraints that expose weak engineering?"
01
Visible examples help you iterate. Hidden tests cover edge cases and larger inputs without handing you the answer.
02
Every test reports server-measured time and allocated bytes. Some challenges enforce hard budgets for both.
03
Specialized tracks grade query plans, code structure, dependency rules, security payloads, or the strength of the tests you wrote.
Read how grading works or see how each submission runs inside an isolated server-side sandbox.
Who this is for
You know how to make code compile. Now you want to recognize an accidental O(n²), see the SQL behind LINQ, refactor without changing behavior, and close a security hole for the right reason.
Each exercise isolates one skill, returns immediate evidence, and gives you another attempt. Use open practice for variety or Learning Paths when you want the next challenge chosen for you.
C# coding challenge FAQ
Yes. The editor, compiler, tests, and results all run from your browser. Your code executes in a disposable server-side sandbox, so there is no SDK or local setup required.
Katabench is built primarily for working developers who already know C# syntax and want deeper practice in performance, data access, refactoring, architecture, testing, and security. Challenges range from Easy to Hard.
Many are. The Free plan includes the full algorithm catalog, every Test Writing and Design Principles exercise, free previews in the database, refactoring, architecture, and secure coding tracks, the guided Katabench Tour, and 10 graded submissions a day. Pro unlocks the rest of those four tracks, every learning path, the full hidden performance suites, and unlimited submissions under fair use.
Correct output is only the starting point. Depending on the track, a solution may also need to meet a time or allocation budget, use the intended database plan, satisfy architecture rules, or block real attack payloads.
Open a C# challenge, run the samples, then submit against the production-grade checks. Your first puzzle needs no account.
Try a C# challenge free