Sort an array of integers (merge sort).
Example 1
Input: nums = [5,1,1,2,0,0]
Output: [0,0,1,1,2,5]
Explanation: Sorting with duplicate elements.
Output: [0,0,1,1,2,5]
Explanation: Sorting with duplicate elements.
Example 2
Input: nums = [5,2,3,1]
Output: [1,2,3,5]
Explanation: Merge sort sorts the array.
Output: [1,2,3,5]
Explanation: Merge sort sorts the array.