Every night has a free room, and the guest is still turned away
transcript
Every night of this three-night stay has a free room. And the hotel turns the guest away.
Two standard rooms. Guest A has Monday night. Guest B has Wednesday night. Guest C wants Monday to Thursday. Three nights.
Pick room numbers at booking. A gets 101. B gets 102. Now no single room is free all three nights. C is turned away. Though C fits. Instead, count rooms per type, per night. No night is full. So C can be sold right now. Real rooms are assigned at check-in.
At check-in, A gets a room for Monday. B gets the same room on Wednesday. They never meet. C takes the other room, all three nights.
Assign in arrival order. Any free room will do. It never needs more rooms than the busiest night. The counts guarantee that.
Sell room types, counted per night. Assign real rooms at check-in. Never turn away a stay that fits.
Full breakdown in the lecture.