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 520 focused exercises.
No signup required for your first kata. Nothing to install.
Advanced C# exercises
The catalog starts with C# algorithm problems and keeps going into the work that fills an actual .NET codebase. Pick one track for focused reps, browse every C# practice problem, 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 the SQL your code generates on the sample tests, and on katas with plan rules the execution plan, so you learn when the database did the wrong work.
Start free: Project Only the Names →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 tracks, follow a guided C# Learning Path.
Free C# practice problems
Every algorithm problem is on the Free plan. Each page shows the brief and the starter code before you open the editor.
Find the indices of the two numbers that add up to a target.
Decide whether two strings are anagrams of each other.
Decide whether an array contains any repeated value.
Is the sentence a palindrome once punctuation and case are ignored?
Are the brackets balanced and properly nested?
Maximize the profit from a single buy followed by a later sell.
Find the largest sum of any contiguous subarray.
For each index, return the product of all other elements, without division.
Two guides explain why the grader looks past correct output: where Big-O bites in production and why a green checkmark is incomplete. The allocation tax in C# covers what the memory numbers mean.
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?"
Visible examples help you iterate. Hidden tests cover edge cases and larger inputs without handing you the answer.
On algorithm and database katas, every test reports server-measured time and allocated bytes. Some challenges enforce hard budgets for both.
Specialized tracks grade query plans, code structure, dependency rules, security payloads, or the strength of the tests you wrote.
C# in a full editor, right in your browser. Run the samples before you submit.
Every submission is screened before it runs. Code that reaches for known-dangerous APIs is rejected outright.
Built server-side with the same compiler you use locally, full diagnostics on errors.
Executed in a disposable, isolated sandbox. One per submission.
Time, memory, and correctness, measured on the server, where they can't be faked.
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 and every Learning Path, with 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.
Yes. After you attempt a problem you can reveal a correct reference solution, study it, then reset the editor and solve it again from memory. Revealing needs an account, and daily reveal limits depend on your plan.
Open a C# challenge, run the samples, then submit against the production-grade checks. Your first kata needs no account.
Try a C# challenge free