You are given an integer array nums.
In one operation, you can select any contiguous subarray of nums and replace it with its maximum element.
Return the maximum possible length of an array sorted in non decreasing order that can be obtained by performing this operation any number of times.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
In one operation, you can select any contiguous subarray of nums and replace it with its maximum element.
Return the maximum possible length of an array sorted in non decreasing order that can be obtained by performing this operation any number of times.
Constraints:
nums.length
nums[i]