Compute minimum-cost service cover | Airbnb Coding Question