Question: Consider the following array: 4 0 6 3 6 4 2 8 7 6 2 4 5 6 6 9 9 3 0 3 1
Consider the following array:Note: For quicksort you will use a different set of numbers, because these resulted in pivots being the largest or smallest item too often. For quicksort use these numbers instead:For problems create a diagram showing the state of the array above after each pass through the array using the following sorting algorithms. In other words, use the method used in lecture to show how each sorting algorithm sorts the numbers above. Also, for each algorithm, state the average bigO running time estimate.For consistency, please use the algorithm as shown in the lecture, not in the text.Selection SortBubble Sort No swap flag. In other words, no stopping early when the list is sorted.Insertion SortMerge SortQuicksort. You must use the version given in the lesson and circle the pivot at each step List each number from the unsorted list above the list that starts with that will be examined if a linear search is used to search for the number Also state the average bigO running time estimate for a linear search Here are the same numbers but sorted:List each number from the list above that will be examined if a binary search is used to search for the number List each number from the list above that will be examined if a binary search is used to search for the number Note that is not in the list. That doesn't change anything. There is still a sequence of numbers that are examined until the algorithm determines that it isn't there State the average bigO running time estimate for binary search.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
