comefrom: <doocs>0581.Shortest Unsorted Continuous Subarray_1.py
code: def findUnsortedSubarray( nums: List[int]) -> int:
      arr = sorted(nums)
      left, right = 0, len(nums) - 1
      while left <= right and nums[left] == arr[left]:
          left += 1
      while left <= right and nums[right] == arr[right]:
          right -= 1
      return right - left + 1
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_4 = sorted ( var_0 )
      var_6 , var_9 = 0 , len ( var_0 ) - 1
      while var_6 <= var_9 and var_0 [ var_6 ] == var_4 [ var_6 ] :
          var_6 += 1
      while var_6 <= var_9 and var_0 [ var_9 ] == var_4 [ var_9 ] :
          var_9 -= 1
      return var_9 - var_6 + 1
  