~/boss / meeting-rooms
Sweep with a min-heap
The Meeting Boss
Ten meetings on the calendar. Book them all in as few rooms as you can.
Loading the fight…
How to beat it
Take the meetings in start order and keep a heap of the times your rooms free up. Look at its top: free by the start? Reuse that room. Still busy? Open a new one. The biggest the heap gets is the answer.
Now the real boss
Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.
On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/meeting-rooms-ii there. Sign in with your email to keep your progress on every device.