229k views
5 votes
To gain experience of using and combing different sorting algorithms: election sort, insertion sort, merge sort, and quick sort. Project Description It is a written assignment, you just need to submit a text file in txt, or docx or pfd format and don't have to submit your testing codes. For the following array x [10] = { 45, 20, 50, 30, 80, 10, 60, 70, 40, 90} show the contents of x after the function call split Pos = split(x, 0, 9) is executed, and give the value of the array index splitPos (the first is the pivot). ( 10 points) Modify quicksort() to incorporate this modification: In quicksort, we do not splitting sublists further when they have fewer than LOWER_BOUND elements for some constant LOWER_BOUND. When execution of the quicksort algorithm terminates, simply sort the whole list using insertion sort. (15 points) Use the similar diagram as

1 Answer

1 vote

Answer:

Motivation? The search problem.

Sorting algorithms: insertion sort, shellsort, heapsort, mergesort, quicksort, bubblesort

At the very least, "general purpose" sorting algorithms require O(n log n) comparisons

Step-by-step explanation:

User Calyth
by
5.9k points