Question: A function in Python for mergeSort where we can split by k. def mergeSort(a_list, split_by_k=2): start_time = time.time() # INSERT YOUR MERGE SORT CODE HERE...

A function in Python for mergeSort where we can split by k.

def mergeSort(a_list, split_by_k=2):
start_time = time.time()
# INSERT YOUR MERGE SORT CODE HERE...
# BEING SURE TO USE split_by_k TO DETERMINE HOW SPLITS ARE MADE
elapsed_time = time.time() - start_time
return (a_list, elapsed_time)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!