I have a large database of data with dates. There are large gaps and large chunks of data without gaps. I want to get a sample of this data such that the dates are as spread out as possible (i.e. as close to evenly distributed as possible).
E.g. if the dates are
[1, 2, 3, 4, 100] and I want to sample 3 elements, the ideal sample would be
[1, 50.5, 100] and the closest available dates are
[1, 4, 100].
Is this a known problem with an existing algorithm?