Compute Earliest Bus Arrival | Apple Coding Question