#3523
Make Array Non-decreasing
specialist · 775 · lc medium +31 · 56.8% accepted · 89 likes · top 52%
Description
Given integer array nums, you may replace any subarray with a single element equal to that subarray\'s maximum. Perform any number of such operations.
Return the largest possible resulting array that is non-decreasing.
Code
1
2
3