Question: The worst case time-complexity of Quick sort is O(n2). True False Question 2 1 pts The best case behaviour occurs for quick sort is, if



The worst case time-complexity of Quick sort is O(n2). True False Question 2 1 pts The best case behaviour occurs for quick sort is, if partition splits the array of size n into n/4:3n/4 n/2:(n/2)1 n/4:3n/2 n/2:n/3 Choose the right order of subroutine in heap sort. Insert: insert an element to the heap Remove: remove an element from the heap Upheap: rebuild the heap after adding an element to the heap Downheap: rebuild the heap after removing an element to the heap None of the above Upheap - Insert - Downheap - Remove Insert - Remove - Upheap - Downheap Insert - Upheap - Remove - Downheap Question 5 1 pts Consider the following heap after buildheap phase. What will be its corresponding array? 97,53,59,26,41,58,31 26,31,41,53,58,59,97 26,53,41,97,58,59,31 26,41,53,97,31,58,59 Assume you have the array 7,9,6,10,3,5,8, what are the swaps that occur when we call build-min-heap? 65,73,93 65,93 93,73,65 93,73 65,93,73
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
