Question: Write Code in Python def merge(list1, list2): #write your code here def mergeSort(numList): #write your code here Goal [10 pts]. As discussed in class, merge
Write Code in Python

def merge(list1, list2):
#write your code here
def mergeSort(numList):
#write your code here
Goal [10 pts]. As discussed in class, merge sort is a sorting algorithm that continually splits a list in half following the divide and conquer strategy. Once two halves are sorted, the fundamental operation "merge" is performed. Write the functions merge(listl, list2) and mergeSort(numList) to correctly sort a list ofnumbers. mergeSort is a recursive function that calls merge to return the final sorted list. . You are not allowed to use the sorted) method or the sort operator. Your code will not get credit if you use them mergeSort must be a recursive function, otherwise, your code will not get credit Remember: If the list is empty or has one item, it is sorted by definition Merging is the process oftaking two smaller sorted lists and combining them together into a single, sorted, new list EXAMPLES >>>mergesort ([12,35, 87,26,9,28, 7]) [7, 9, 12, 26, 28, 35, 87] >>>merge ([12,26, 35, 871,(7,9,28]) 7, 9, 12, 26, 28, 35, 87 >>>merge ([12, 35], [26, 87]) [12, 26, 35, 87]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
