Available question text
Given an array, remove the shortest contiguous subarray (possibly empty) so that the remaining elements — the concatenation of a prefix and a suffix — are non-decreasing. The core approach is to exploit the maximal non-decreasing prefix and suffix and merge them (via two-pointer/binary-search) to minimize the removed length; n ≤ 10^5.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1574. Shortest Subarray to be Removed to Make Array Sorted
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source