Concurrency interview questions
Practice 6 questions on concurrency. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
6 questions
- EASY
Async CountDown Latch
Implement a countdown latch whose wait resolves once countDown has been called the required number of times.
15 minJavaScript - MEDIUM
Async Mutex
PREMIUMImplement an async mutex whose acquire returns a release function, serializing access so only one holder runs at a time.
25 minJavaScript - MEDIUM
Async Semaphore
PREMIUMImplement an async semaphore that admits up to N concurrent holders and queues the rest until a permit frees.
25 minJavaScript - MEDIUM
Async Task Queue
PREMIUMImplement a task queue that runs async jobs under a concurrency limit and resolves an idle promise when drained.
25 minJavaScript - MEDIUM
Priority Request Scheduler
PREMIUMSchedule async requests under a concurrency limit, always running the highest-priority waiter next with a stable FIFO tiebreak.
35 minJavaScript - HARD
Async Read-Write Lock
Implement a read-write lock that allows many concurrent readers or one exclusive writer without starving writers.
40 minJavaScript