Remove k consecutive machines to minimize strength differences
Machines stand in a row, each with a strength. Remove exactly k consecutive machines so that the sum of absolute differences between neighbouring strengths in the remaining row is as small as possible, and return that sum.
No answer yet. Write the first one; the best answer gets endorsed.
