Given five points on a straight line such that their pairwise distances are 1,2,4, ..., 14,18,20 (after ordering), find the respective positions of the five points (relative to the furthest point on the left).
Tell me more
×
Programming Puzzles & Code Golf Stack Exchange is a question and answer site for
programming puzzle enthusiasts and code golfers. It's 100% free, no registration required.
|
|
R
Here is the source of the problem and an algorithm with R which I used for inspiration. |
|||