mergesort in python3
\nclass Solution:\n    def sortArray(self, nums: List[int]) -> List[int]:\n        #mergesort\n        if len(nums) <= 1:\n            return nums\n        midd
```\nclass Solution:\n    def sortArray(self, nums: List[int]) -> List[int]:\n        #mergesort\n        if len(nums) <= 1:\n            return nums\n        middle = len(nums) // 2\n        left = self.sortArray(nums[:middle])\n        right = self.sortArray(nums[middle:])\n        merged = []\n        while left and right:\n            if left[0] <= right [0]:\n                merged.append(left.pop(0))\n            else:\n                merged.append(right.pop(0))\n        merged.extend(right if right else left)\n        return merged\n```
['Merge Sort', 'Python3']