Code Room
Code reviewMediumcr-p072
Subject ConcurrencyLevel Mid–Senior~18 minCommon in Concurrency interviewsIndustries Software development

Question

Review this in-memory counter shared across threads.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewpython
counts = {}def record(key):    counts[key] = counts.get(key, 0) + 1
Run or narrate your approach, then ask the coach.