After an algorithm by E. Bjorklund. See paper by Godfried Toussaint.
k |
The number of 'hits'. |
n |
The total sum of all the durations in the array. |
Bjorklund2(3, 8) //tresillo Bjorklund2(5, 8) //cinquillo Bjorklund2(9, 16) //rumba
see Pbjorklund2 for more examples.