Merge Sort

  1. Modify the mergeSort() function on P.481, and show the merged list at the end of the function.
  2. Generate a list with 8 random integers and test your new mergeSort() with the list.
  3. The output may look like the following:
    
    18      2       50      27      41      5       59      78
    2       18
    27      50
    2       18      27      50
    5       41
    59      78
    5       41      59      78
    2       5       18      27      41      50      59      78