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
 Spring '11
 Anonymous
 Insertion Sort, Insertion Sort algorithm, selection sort algorithm

Click to edit the document details