Given a nums sorted in non-decreasing order.
In one operation, you can choose two indices i and j such that i < j and nums[i] < nums[j], and remove the elements at these two indices from nums. The remaining elements keep their original relative order.
Return the minimum possible length of nums after performing this operation any number of times.
Constraints:
nums.length
nums[i]
nums is sorted in non-decreasing order.
Given a nums sorted in non-decreasing order.
In one operation, you can choose two indices i and j such that i < j and nums[i] < nums[j], and remove the elements at these two indices from nums. The remaining elements keep their original relative order.
Return the minimum possible length of nums after performing this operation any number of times.
Constraints:
nums.length
nums[i]
nums is sorted in non-decreasing order.