Shortest Unsorted Continuous Subarray Solutions in PythonNumber 581Difficulty EasyAcceptance 31.1%Link LeetCodeOther languages —SolutionsPython solution by haoel/leetcodedef findUnsortedSubarray(self, nums): same = [a == b for a, b in zip(nums, sorted(nums))] return 0 if all(same) else len(nums) - same.index(False) - same[::-1].index(False)def findUnsortedSubarray(self, nums): same = [a == b for a, b in zip(nums, sorted(nums))] return 0 if all(same) else len(nums) - same.index(False) - same[::-1].index(False)