Shortest Unsorted Continuous Subarray
Medium
Array Techniques
Print the length of the shortest subarray that, if sorted, makes the whole array sorted in non-decreasing order (0 if already sorted).
Constraints
1 <= n <= 10^4
Discussion
No discussions yet.
Join Shalyam Newsletter
Get exclusive insights with every issue: education, research and innovation news.
Shalyam Support
Hi! Ask us anything โ we'll reply on WhatsApp or Telegram within 24 hours.