Leetcode 1144. Decrease Elements To Make Array Zigzag
Given an array where a move decrements any element by 1, return the minimum number of decrements needed to make the array zigzag (either every even index is a peak or every odd index is a peak). Compute the minimal total decreases required across the two possible zigzag patterns.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.