Thread-Safe Key Call Counter

Asked at Citadel · Coding Questions · Difficulty: Medium · Last asked May 21, 2026

Build a call counter that tracks how many times each key has been used. Implement `CallCounter` with a `count(key)` method that records one more call for the key and returns the total number of calls for that key so far, including this one.

Loading the problem…