You are given a stockPrices where stockPrices[i] = [day_i, price_i] represents the price of a stock on day day_i as price_i. A line chart is created by plotting each point on a Cartesian plane and drawing straight line segments between consecutive points sorted in ascending order of their day values.
Return the minimum number of line segments required to represent the full line chart.
Constraints:
stockPrices.length
stockPrices[i].length
day_i, price_i
All day_i are distinct.
You are given a stockPrices where stockPrices[i] = [day_i, price_i] represents the price of a stock on day day_i as price_i. A line chart is created by plotting each point on a Cartesian plane and drawing straight line segments between consecutive points sorted in ascending order of their day values.
Return the minimum number of line segments required to represent the full line chart.
Constraints:
stockPrices.length
stockPrices[i].length
day_i, price_i
All day_i are distinct.