Explain the time and space complexity of your solution for a standard sorting or searching problem.
Implement merge_sort(nums) to return the values in ascending order without modifying the input list. The input is a list of integers, and the output is a new sorted list.
def merge_sort(nums):