Question: Sort the sequence 5, 6, 1, 3, using: (a) insertion sort (b) insertion sort till located. Assume the numbers are in an array. Show the

Sort the sequence 5, 6, 1, 3, using: (a) insertion sort (b) insertion sort till located. Assume the numbers are in an array. Show the entire array whenever the array changes, until the array is sorted. Do not cross out and rewrite elements. What is the running time of insertion sort if all elements are equal? Give the running time for (a) insertion sort, (b) insertion sort till located, (c) insertion sort with flag
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
