Hi! I need some ideas for the following problem.
Given an initial array of zeros and target array, and operation of adding 1 to range [l, r]. Find the minimum number of steps to reach the target array.
I am looking for a solution which is better than O(n^2).
Thanks!