Problem 2280 · Medium

Minimum Lines to Represent a Line Chart

Sort the points by day and count the places where the slope changes; equal slopes share one line.

Open the interactive visualisation