You are given an integer array nums and an integer k.
Consider every sliding window of size k moving from left to right across nums. For each window, find the length of the shortest continuous subarray that, if sorted in ascending order, makes the entire window sorted in ascending order. If a window is already sorted, the length is
Return an array of integers where each element corresponds to the minimum subarray length required to sort that respective window.
Constraints:
nums.length
k nums.length
nums[i]
You are given an integer array nums and an integer k.
Consider every sliding window of size k moving from left to right across nums. For each window, find the length of the shortest continuous subarray that, if sorted in ascending order, makes the entire window sorted in ascending order. If a window is already sorted, the length is
Return an array of integers where each element corresponds to the minimum subarray length required to sort that respective window.
Constraints:
nums.length
k nums.length
nums[i]