in reply to computation difficulty

If storing the complete list of flights in memory is an issue for whatever reason (too large of a dataset, items being added in realtime, whatever), there's also the option of setting up the array to represent a rolling 20-minute window, with flights removed from the head of the array as you move past their arrival time.

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.