Question: Compare merge sort and quick sort Write a Python program to time and compare the merge sort 1 (orig with slice) and merge sort 2
Compare merge sort and quick sort
Write a Python program to time and compare the merge sort 1 (orig with slice) and merge sort 2 (without slice) and quick sort 1 (original) and quick sort 2 (w/ median of 3) algorithms for data sizes of 100, 500, 1000 numbers. You might also include other sorting algorithms for comparison purposes. Also compare the algorithms on a sorted list or nearly sorted list. Another interesting comparison is to generate a list of 1000 items with few unique values. For example, you might populate the list with only integers from 1 to 10.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
