Question: 1. Write a program to sort an array of size 10 using both Merge and Quick sort algorithms. Make sure that both algorithm collaborate to

 1. Write a program to sort an array of size 10

1. Write a program to sort an array of size 10 using both Merge and Quick sort algorithms. Make sure that both algorithm collaborate to sort one dimensional array, i.e. if merge sort is applied on the first part of the array then Quick sort must be applied on the other part as shown in the following figure: e Not sorted 1 1 1 L Merge sorte Quick sort e e Sorted Make sure to follow the following rules: a. You are not allowed to apply each algorithm on the entire array. b. If one algorithm applied for one part, then the other algorithm applied to the rest of the array. For example merge Sort(arr,0,4) then quicksort(arr,5.n-1). c. Make sure that your code works on any input. d. Never use any other sorting algorithms. e. You are only allowed to apply algorithms with O(n) complexity other than Merge and Quick sort. f. Make sure that your final array sorted after both Merge and Quick sort algorithms finish

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!