Given an integer array arr, determine the length of the shortest contiguous subarray that can be removed such that the remaining elements are in nondecreasing order.
Note: A subarray is a contiguous sequence of elements within an array.
Constraints:
arr.length
arr[i]
Given an integer array arr, determine the length of the shortest contiguous subarray that can be removed such that the remaining elements are in nondecreasing order.
Note: A subarray is a contiguous sequence of elements within an array.
Constraints:
arr.length
arr[i]