Question: Q31. The selection sort algorithm repeatedly moves the smallest element from the unsorted list to the beginning of the unsorted list. a. true b. false

Q31. The selection sort algorithm repeatedly moves the smallest element from the unsorted list to the beginning of the unsorted list. a. true b. false Q32. Heap sort, for array-based lists, is of the order ____ even in the worst case. a. O(log n) b. O(n log n) c. O(log2n) d. O(n log2n) Q33. In quick sort, the list is partitioned into two sublists by selecting a(n) ____, and the two sublists are then sorted and combined into one list in such a way so that the combined list is sorted. a. marker b. pivot c. midpoint d. average Q34. Quick sort uses ____ for implementation. a. recursion b. traversal c. heaps d. queues Q35. The selection sort algorithm sorts a list by selecting the smallest element in the (unsorted portion of the) list, and then moving this smallest element to the top of the (unsorted) list. a. true b. false Q36. It can be shown that the average number of key comparisons for insertion sort is ____. a. O(n) b. O(n2) c. O(n log n) d. O(n2 log n) Q37. Merge sort divides the list into ____ sublists of nearly equal size. a. two b. three c. four d. five Q38. In quick sort, the average case for the number of swaps is O(n log2n). a. true b. false Q39. Selection sort always starts with the middle element of the list. a. true b. false Q40. Suppose that L is a list of n elements, where n > 0. Let W(n) denote the number of key comparisons in the worse case of merge sort. Which of the following is true? a. W(n) = O(n log n) b. W(n) = O(n log2n) c. W(n) = O(n2 log2n) d. W(n) = O(log n)

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!