Shortest unsorted continuous subarray
Find the shortest contiguous subarray that, if sorted, makes the whole array sorted, and return its length. Start from sorting a copy, then find an O(n) two-pointer solution.
No answer yet. Write the first one; the best answer gets endorsed.
