Question: Apply insertion sort to sort the list 4, 15, 36, 30, 3, 9. (a) How does the algorithm know when the list is sorted? (b)
Apply insertion sort to sort the list 4, 15, 36, 30, 3, 9. (a) How does the algorithm know when the list is sorted?
(b) What is the maximum number of comparisons required for a list of six numbers?
(c) How many comparisons did you actually require for the given list?
Please explain your working. I do not want a rushed answer. thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
