Solution: Shortest Unsorted Continuous Subarray
Let's solve the Shortest Unsorted Continuous Subarray problem using the Knowing What to Track pattern.
We'll cover the following...
We'll cover the following...
Statement
Given an integer array nums, return the length of the shortest contiguous subarray such that sorting only that subarray in nondecreasing order makes the entire array nums sorted in nondecreasing order. If nums is already sorted in nondecreasing order, return