## Project: Merge Sort

The [[Merge sort]] is very efficient sort that was first introduced by [[John von Neumann]] in 1945. It can be implemented very easily using recursion. Write a function that takes a list of integers and sorts the list without modifying it, returning a sorted list, using a merge sort. Test the function by creating a random list of integers, print the random list, sort the list, then print out the sorted list. Accept the number of integers to put in the list and the maximum integer to randomly generate on the command line. What is the worst case performance of the Merge sort?

## Output

$

**g++ -std=c++17 MergeSort.cpp -o MergeSort -lfmt**$**./MergeSort 10 10**Random List [6, 5, 1, 2, 4, 5, 0, 6, 9, 4] Sorted List [0, 1, 2, 4, 4, 5, 5, 6, 6, 9] $**g++ -std=c++17 MergeSort.cpp -o MergeSort -lfmt**$**./MergeSort 20 100**Random List [63, 71, 86, 66, 94, 76, 12, 29, 58, 37, 80, 62, 75, 79, 56, 84, 73, 38, 45, 27] Sorted List [12, 27, 29, 37, 38, 45, 56, 58, 62, 63, 66, 71, 73, 75, 76, 79, 80, 84, 86, 94]