Question: Write a program to implement Heap sort. Also implement Insertion Sort. After you have tested both, generate a very large array (30,000 or more) of
Write a program to implement Heap sort. Also implement Insertion Sort. After you have tested both, generate a very large array (30,000 or more) of bytes and sort increasingly larger portions of the array (5000, 10000, ..., 30000) with both algorithms. Draw a graph of execution time versus number of elements for both algorithms. What are your conclusive findings?
Step by Step Solution
3.48 Rating (158 Votes )
There are 3 Steps involved in it
Answer Here is the Python code import time import random import matplotlibpyplot as plt def heapifya... View full answer
Get step-by-step solutions from verified subject matter experts
