BuyHatke interview question

Elevator system design problem