Multi-threaded Increment with Thread Safety

Asked at WeRide · Coding Questions · Difficulty: Medium

Implement a shared counter that many threads can increment concurrently without losing updates, and a driver that runs the increments on worker threads.

Loading the problem…