You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
"Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too.
3
+
4
+
You need to find the shortest such subarray and output its length."
5
+
6
+
##Complexity
7
+
***Time**: worst), 4 loops are used
8
+
***Space**: worst), to hold min and max values