Answer: Slack SWE Interview Question 2023 November | Heaps and Intervals | on-campus
Answer · Posted Jun 2026
Solution: Greedy with Min-Heap Tracking Earliest Ending Room Approach Sort meetings by start time. Use a min-heap that stores the end times of all currently occupied rooms — the heap top is always the room that becomes free the earliest. For each new meeting: check if the room ending earliest (heap top) finishes before or at the new meeting's start. If yes, that room is free — pop its old end time and push the new end time (room reused). ...
The full answer & interview discussion are available to premium members.
Log in Create a free account