Telemetry: Top K Frequent Error Codes
Also known as: Top K Frequent Elements
Netflix Error Dashboard: Critical Alert System You're building Netflix's production monitoring dashboard. Given error codes from the last hour, identify the K most frequent issues to display on the ops team's dashboard. For equal frequencies, show lower error codes first (they're typically more critical). Example: errors = [500,500,500,404,404,200], k=2 → [500, 404]
This one tests whether you can keep a best-so-far structure honest as you go. Interviewers love it because it reveals your priority-based reasoning and your edge-case discipline. The trap is stale entries or unbalanced structures—be clear about what belongs in the heap.

Meet Coco
Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.
Each locked part opens in the editor once the part before it passes.