Merge sort

Write merge_sort(items) that returns a new sorted list using merge sort: split the list in half, sort each half with merge_sort, and merge the two sorted halves. Do not change the list you were given.

merge_sort([8, 3, 12, 5, 1, 9, 3])  ->  [1, 3, 3, 5, 8, 9, 12]
merge_sort([])                       ->  []

The point is to practise divide and conquer, so write the recursion and the merge yourself rather than calling sorted. One check sorts fifty thousand items, where a quadratic sort would not finish in the ten-second limit.

def merge_sort(items):
    ...