Question: 1 . Implement the Insertion Sort algorithm as discussed in Lecture 1 . ( Hint: use the function checked _ sorted to check if your

1. Implement the Insertion Sort algorithm as discussed in Lecture 1.
(Hint: use the function checked_sorted to check if your output is
indeed sorted.)
2. Implement the Merge Sort algorithm as discussed in Lecture 2.
(Hint: use the function checked sorted to check if your output is
indeed sorted.)
3. Implement the Heap Sort algorithm as discussed in Lecture 2.
(Hint: use the function checked sorted to check if your output is
indeed sorted.)
4. For each algorithm, try different ranges of numbers to be sorted
to test the performance and time complexity. For example:
a. Array[1....100]
b. Array[1....1000]
c. array[1....10000]
d. Array[1....100000]
e. Array[1....1000000]
f. Write a paragraph discussing your findings on how the
different sizes affected the time complexity. Discuss which
algorithm outperformed the other and why.
g. Graphs are encouraged for visualization and to draw
conclusions, but not required.

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!