Remove elements from the left or right end, subtracting each from x. What is the fewest removals that brings x exactly to zero?
Remove elements from the left or right end, subtracting each from x. What is the fewest removals that brings x exactly to zero?
Opens with the full question.