Search
⌘K

Leetcode 3523. Make Array Non-decreasing

Partition the array into contiguous segments (each can be replaced by its maximum) and choose the partition that maximizes the number of segments such that the sequence of segment maximums is non-decreasing; return that maximum size.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.