golang merge sort
Merge sort, O(n) space and O(nlog(n)) time complexity.\ngo\nfunc sortArray(nums []int) []int {\n    mergesort(nums, 0, len(nums))\n    return nums\n}\n\nfunc me
Merge sort, O(n) space and O(nlog(n)) time complexity.\n```go\nfunc sortArray(nums []int) []int {\n    mergesort(nums, 0, len(nums))\n    return nums\n}\n\nfunc mergesort(nums []int, start, end int) {\n    if start >= end-1 {\n        return\n    }\n    mergesort(nums, start, (start+end)/2)\n    mergesort(nums, (start+end)/2, end)\n    merge(nums, start, end)\n}\n\nfunc merge(nums []int, start, end int) {\n    arr, mid := make([]int, end-start), (start+end)/2\n    for i, j, k := start, mid, 0; k < len(arr); k++ {\n        if j == end || (i < mid && nums[i] < nums[j]) {\n            arr[k] = nums[i]\n            i++\n        } else {\n            arr[k] = nums[j]\n            j++\n        }\n    }\n    copy(nums[start:end], arr)\n}\n```
['Go']