Merge Sort for Interviews! Short and Pythonic.
\ndef sortArray(self, nums: List[int]) -> List[int]:\n        def mergeTwoSortedArrays(a, b , res):\n            i, j, k = 0, 0, 0\n            while i<len(a) a
```\ndef sortArray(self, nums: List[int]) -> List[int]:\n        def mergeTwoSortedArrays(a, b , res):\n            i, j, k = 0, 0, 0\n            while i<len(a) and j<len(b):\n                if a[i]<b[j]:\n                    res[k] = a[i]\n                    i+=1\n                else:\n                    res[k] = b[j]\n                    j+=1\n                k+=1\n            \n            res[k:] = a[i:] if i<len(a) else b[j:]\n               \n        def mergesort(nums):\n            if len(nums) == 1: return\n            mid = len(nums)//2\n            L = nums[:mid]\n            R = nums[mid:]\n            \n            mergesort(L)\n            mergesort(R)\n            \n            mergeTwoSortedArrays(L, R, nums)\n        \n        mergesort(nums)\n        return nums\n```
['Merge Sort', 'Python', 'Python3']