After an algorithm by E. Bjorklund. See paper by Godfried Toussaint.
The number of 'hits'.
The total sum of all the durations in the array.
see Pbjorklund2 for more examples.