Minimize exact layover bookings | Airbnb Coding Question