I am referring to the problem in Introduction to Algorithms. I kind of fail to understand the problem.
From what I see, I need to sort the x-coordinates of the given set of points and then form a optimal path from the smallest x coordinate to the largest x coordinate.
For eg. (x1,y1) (x2,y2) ...(xn,yn) are sorted points. Isnt the optimal path simply x1,x2,x3,...xn-1,xn,xn-1,...,x3,x2,x1.
What am I missing here? How does dynamic programming come into picture here?