This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 11, 10, 17, 5, 9, 1 Illustrate the Selection Sort algorithm and clearly state each step. 7. a) Given the unsorted array, S = {F, D, K, H, J, C, E}, show all the steps to sort this array using Merge sort. b) What is the best and worst case running time for Merge sort. If the data S is given to you in increasing order, like S = {C, D, E, F, H, J, K}, will the number of operations you have to do be the same, more than or less than that of case (a). Explanation to your answer is required. 8. a) Explain the insertion sort algorithm using the following keys: 12 pts 3 0 4 6 4 15 1 Is this the best case data arrangement for insertion sort, why or why not? (b) If you have to use Selection sort on the same data, will the number of steps needed be same, less or more than insertion sort. Explain your answer....
View
Full
Document
This note was uploaded on 02/15/2011 for the course CMP 425 taught by Professor Anonymous during the Spring '11 term at Alabama A&M University.
 Spring '11
 Anonymous

Click to edit the document details