Databricks coding question, reconstructed from 13 candidate reports (February 2025 to September 2026). Tests: stateful class design; heaps, top-k and greedy scheduling. Candidates reported 4 follow-ups. The write-up includes a Python solution that passes 7 test cases.