Faster than 91.41% of Python online submissions - Explanation using an example
```\nclass Solution(object):\n    def findLengthOfShortestSubarray(self, arr):\n        """\n        :type arr: List[int]\n        :rtype: int\n        """\n   
```\nclass Solution(object):\n    def findLengthOfShortestSubarray(self, arr):\n        """\n        :type arr: List[int]\n        :rtype: int\n        """\n        \n        if len(arr) < 2: return 0\n        \n        # first we get the increasing array on the left\n        # in example: [1,2,3,10,4,2,3,5] - left increasing array is [1,2,3,10] \n        # so after the loop, leftArrEnd = 3 \n        leftArrEnd = len(arr) - 1  \n        for i in range(len(arr)-1):\n            if arr[i] <= arr[i+1]:\n                continue\n            leftArrEnd = i\n            break\n        \n        # this is to return 0 when complete array is sorted in ascending order.\n        if leftArrEnd == len(arr) - 1: return 0\n        \n        # next we get the increasing array on the right\n        # in example: [1,2,3,10,4,2,3,5] - right increasing array is [2,3,5]\n        # so after the loop, rightArrStart = 5 \n        rightArrStart = 0\n        for i in range(len(arr)-1, 0, -1):\n            if arr[i] >= arr[i-1]:\n                continue\n            rightArrStart = i\n            break\n        \n        # finally get all the possible valid mergers of left and right arrays\n        # and keep track of minimum elements between left and right array, i.e. length of subarray to be removed.\n        ans = min(len(arr) - leftArrEnd - 1, rightArrStart)\n        l, r = 0, rightArrStart\n        while (l <= leftArrEnd and r < len(arr)):\n            if arr[l] <= arr[r]:\n                ans = min(ans, (r - l - 1))\n                l += 1\n            else:\n                r += 1\n                \n        return ans
[]