Skip to content
</>
CodingGyan
Topics
About
Search problems
☾
Home
/
Multithreading and Concurrency
⚡
Multithreading and Concurrency
Threads, locks and safe parallel code. 19 problems · Advanced level.
All
Easy
Medium
Hard
19 problems
Threads
✓
Parallel Sum with Threads
medium
Synchronization
✓
Thread-Safe Counter
medium
✓
Print Numbers with Two Threads (Odd and Even)
hard
✓
Phases with a Barrier
hard
Executors
✓
Sum of Squares with Worker Threads
medium
✓
Parallel Word Count per Line
medium
completable future
✓
Async Tasks: Combine Results
medium
executor service
✓
Count Primes with a Thread Pool
medium
✓
Matrix Row Sums with Parallel Tasks
medium
semaphore
✓
Semaphore: Limit Parallel Workers
medium
safe publication
✓
Lazy Singleton Created Exactly Once
medium
countdown latch
✓
Start Gate and Done Latch
medium
read write lock
✓
Cache with a Read-Write Lock
medium
deadlock
✓
Deadlock-Free Transfers (Lock Ordering)
hard
wait notify
✓
Producer and Consumer with a Bounded Queue
hard
✓
FizzBuzz with Four Threads
hard
fork join
✓
Parallel Merge Sort (Fork/Join)
hard
deadlock avoidance
✓
Dining Philosophers with Ordered Forks
hard
atomics
✓
Shared Maximum with Compare-and-Set
hard