in reply to computation difficulty
Another possibility would be to maintain a hash with time as the key and number of arrivals in that minute as the value. Grabbing any arbitrary set of minutes and adding up the total number of arrivals for those times would then be trivial. It would also provide much easier ways to deal with rescheduled arrivals and out-of-order input data.
|
|---|