2021: Week 30 - Lift Your Spirits
Challenge By: Jenny Martin Inspiration for Preppin' challenges can come from anywhere. I've recently moved into a block of flats and let me tell you, I spend a lot of time waiting for a lift (or elevator if you're across the pond). It got me pondering whether the lift is operating optimally. Is it better to stay on the floor that you drop passengers until the next time someone calls a lift, or should the lift return to the most common starting floor? Input There is one input this week, detailing the time of each trip the lift takes, including which floor the passengers enter the lift and which floor the passengers leave the lift. For simplicity, assume that the lift does not stop mid-journey to pick up new passengers, but completes its current trip before starting a new one. Requirements Input the data Create a TripID field based on the time of day Assume all trips took place on 12th July 2021 Calculate how many floors the lift has to travel between trips The order of flo...