Also reported as Top K Frequent Elements · LeetCode 347
Microsoft phone-screen question, reconstructed from 7 candidate reports (March 2026 to September 2026). Candidates reported 3 follow-ups. The write-up includes a Python solution that passes 12 test cases.