This question evaluates proficiency in array algorithms, algorithmic efficiency (linear time and constant-space reasoning), and handling edge cases related to non-decreasing order, within the Coding & Algorithms domain.
Given an integer array nums (length up to 2×10^5), return the shortest subarray [L,R] you can remove so that the remaining elements form a non‑decreasing array. If the array is already non‑decreasing, return [-1,-1]. Requirements: