A one-dimensional garden lies on the x-axis, starting at point n. There are n + 1 taps positioned at integer points
You are given an integer n and an integer array ranges of length n + 1, where ranges[i] represents the reach of the
Return the minimum number of taps that must be opened to water the entire garden
Constraints:
n
ranges.length n + 1
ranges[i]
A one-dimensional garden lies on the x-axis, starting at point n. There are n + 1 taps positioned at integer points
You are given an integer n and an integer array ranges of length n + 1, where ranges[i] represents the reach of the
Return the minimum number of taps that must be opened to water the entire garden
Constraints:
n
ranges.length n + 1
ranges[i]