Solution Found!
Use the results of Exercises 18 and 22 to compare the worst-case behavior of
Chapter 3, Problem 23(choose chapter or problem)
Use the results of Exercises 18 and 22 to compare the worst-case behavior of SelectionSort (counting comparisons and exchanges) and MergeSort (counting comparisons) for n = 4, 8, 16, and 32 (use a calculator or spreadsheet).
Questions & Answers
QUESTION:
Use the results of Exercises 18 and 22 to compare the worst-case behavior of SelectionSort (counting comparisons and exchanges) and MergeSort (counting comparisons) for n = 4, 8, 16, and 32 (use a calculator or spreadsheet).
ANSWER:Step 1 of 5
The number of comparisons for -element list in the SelectionSort algorithm is .
The number of exchanges for -element list in the SelectionSort algorithm is .
The number of comparisons for -element list in the MergeSort algorithm is .