There is a one-dimensional garden on the x-axis from 0 to n. You are given n and an integer array ranges of length n + 1, where the i-th tap can water the area [i - ranges[i], i + ranges[i]]. Return…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.