Question: a) Both the merge sort and quick sort algorithms sort a list by partitioning it. Explain how the merge sort algorithm differs from the
a) Both the merge sort and quick sort algorithms sort a list by partitioning it. Explain how the merge sort algorithm differs from the quick sort algorithm in partitioning the list. b) Show the steps how the following list of keys is sorted using either Merge sort or Quick sort. c) Show the number of comparisons required for any one the sorting algorithms for the given sequence: (i) Bubble Sort (ii) Selection Sort (iii) Insertion Sort. The list of keys to be used for part b) and c): 80, 30, 78, 55, 48, 70, 35, 60, 90, 8, 15, 75, 10, 62, 58
Step by Step Solution
3.38 Rating (142 Votes )
There are 3 Steps involved in it
a Merge Sort and Quick Sort both sort a list by partitioning it but they do so differently Merge Sor... View full answer
Get step-by-step solutions from verified subject matter experts
