steps. One step adds 1 to any element.
Return the fewest steps after which the array is **strictly increasing**, meaning each element is greater than the one before it. A single-element array already counts as strictly increasing.steps=[3, 3, 2] → 4
Raise the second value to 4 (1 step) and the third to 5 (3 steps): [3, 4, 5] in 4 steps.
steps=[2, 9, 4, 4] → 13
The target is [2, 9, 10, 11]: 6 + 7 = 13 steps.
steps=[7] → 0
steps=[3, 3, 2]
4
Run checks the first 3 tests in your browser. Submit checks all 116 tests on the server, hidden ones included.