Design a thread-safe counter class supporting increment(), decrement(), and get() operations that produce correct results when called concurrently from multiple threads.
Enable JavaScript for the full StreamPrep guide.