Object-Oriented Programming · Netflix · Easy
Problem Statement Create a counter that remains correct when several worker threads read or modify it concurrently. Implement an AtomicCounter class with these methods: Requirements Any method may be invoked concurrently by multiple threads. Concurrent updates must never overwrite one another. Every operation that changes the counter must be indivisible from the perspective of other threads. get() must return a legitimate value of the counter rather than a partially updated…
Checking your access…