Leetcode 581. Shortest Unsorted Continuous Subarray
Find the length of the shortest contiguous subarray which, if sorted, makes the entire array non-decreasing — i.e., identify the minimal window that violates the global sorted order. This can be recognized with linear-time patterns (scanning min/max from both ends or using monotonic stacks).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.