Practice writing actual multi-threaded code for common concurrency challenges in interviews and real-world scenarios.
How it Works| Topics | |||
|---|---|---|---|
| 1 | medium | ||
| 2 | medium | ||
| 3 | medium | ||
| 4 | medium | ||
| 5 | medium | ||
| 6 | medium | ||
| 7 | medium | ||
| 8 | medium | ||
| 9 | medium | ||
| 10 | medium | ||
| 11 | medium | ||
| 12 | hard | ||
| 13 | easy | ||
| 14 | medium | ||
| 15 | medium | ||
| 16 | medium | ||
| 17 | medium | ||
| 18 | hard | ||
| 19 | medium | ||
| 20 | medium | ||
| 21 | hard | ||
| 22 | easy | ||
| 23 | medium | ||
| 24 | medium | ||
| 25 | medium | ||
| 26 | medium | ||
| 27 | medium | ||
| 28 | hard | ||
| 29 | hard | ||
| 30 | hard | ||
| 31 | hard | ||
| 32 | hard | ||
| 33 | medium | ||
| 34 | medium | ||
| 35 | medium | ||
| 36 | medium | ||
| 37 | medium | ||
| 38 | medium | ||
| 39 | medium | ||
| 40 | medium | ||
| 41 | hard | ||
| 42 | medium | ||
| 43 | medium | ||
| 44 | medium | ||
| 45 | medium | ||
| 46 | medium | ||
| 47 | medium | ||
| 48 | hard | ||
| 49 | hard | ||
| 50 | hard | ||
Each exercise gives you a class that the judge calls from several threads at once. You write the synchronization, and the judge runs your implementation against a set of concurrent scenarios and compares the result with the expected output.
The judge calls your class from several threads and checks what comes back. Some exercises hand you the threads and ask you to protect shared state; others ask you to create and coordinate the workers yourself.
Each scenario reports a concrete result: the order the callbacks ran in, a final count, the set of nodes visited. Missing synchronization usually surfaces as a wrong value rather than an exception, and often on only some runs.
Evaluate sends your current code to a reviewer that reports on correctness, edge cases, efficiency and code quality, with a time and space complexity estimate. It executes nothing and does not affect your verdict.
The statement gives the class to implement, the guarantee it has to hold under concurrent calls, and worked examples with their expected output. Concurrency, collection and callback APIs are preloaded, so no imports are needed.
Write the class in Java, Python, C++, Go or C#. Drafts are kept per language as you work, and your last submitted code for each language is saved to your account.
Executes only the example cases listed in the Test cases tab and shows the expected and actual output for each. Nothing hidden runs, so a passing run is a starting point rather than a verdict.
Executes the full scenario set, including the cases that are not shown, and records the result in the Submissions tab. Any earlier submission can be loaded back into the editor.
Worked examples and their expected output appear in the problem panel before you write anything, so a failing run can be read against a known-good result.
Each scenario drives your class from several threads and compares what it produces against the expected output. Some scenarios also check ordering, for example that a task waiting on a held lock does not enter until the lock is released. A correct implementation returns the same result every run; an unsynchronized one usually returns a wrong one, sometimes only occasionally.
That pattern is the ordinary symptom of a race condition: the interleaving that breaks the code only occurs on some runs. Treat an intermittent pass as a failure and look for state that is read or written outside a lock. Resubmitting until it passes leaves the bug in place.
Low-level design judges a class against a fixed sequence of calls and reviews the design it implies. These exercises run concurrent scenarios and compare the output, with no design score, because correctness here means holding an invariant under interleaving rather than shaping a good API.
Java, Python, C++, Go and C#. Every exercise ships a starter class and a reference solution in all five, and the editor language picker lists exactly those.
Yes. Drafts are stored in your browser per exercise and per language, and your last submitted code for each language is saved to your account. The Submissions tab keeps every attempt, and selecting one loads its code back into the editor.
An account is required to run, submit or evaluate. Free accounts get 50 runs, 30 submissions and 30 evaluations a day. AlgoMaster premium members get unlimited.