2702. Minimum Operations to Make Numbers Non-positive
ArrayBinary Search
Hints
Hint 1
Given a candidate, can you check if it is possible to decrement all values to be less than or equal to 0 within the given steps in O(N) time?
Hint 2
If so, run a binary search to look for the minimum such valid candidate.
Preparing judge…