July 29, 2015, 1:03 a.m. by Rosalind Team
If A = (a1 = 0, a2, ... , an) is a set of n points on a line segment in increasing order (a1 < a2 < · · · < an), then
The following problem asks us to reconstruct A from
Given all pairwise distances between points on a line segment, reconstruct the positions of those points.
Given: A collection of integers L.
Return: A set A such that ∆A = L.
-10 -8 -7 -6 -5 -4 -3 -3 -2 -2 0 0 0 0 0 2 2 3 3 4 5 6 7 8 10
0 2 4 7 10