Find the minimal contiguous segment to sort to make the entire array sorted.
Constraints
Example
>>> find_unsorted_length([2,6,4,8,10,9,15]) 5 >>> find_unsorted_length([1,2,3,4]) 0 >>> find_unsorted_length([1,3,2,2,2]) 4
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints