Decrement a positive prefix by one, or reset any single element to zero. Find the fewest operations that turn the whole array into zeros.
Decrement a positive prefix by one, or reset any single element to zero. Find the fewest operations that turn the whole array into zeros.
Opens with the full question.