Dynamic programming applied to unequally spaced arrays | Synapse