Question: 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
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 _____ of the (unsorted) list. a. pivot b. trip c. middle d. bottom Insertion sort tries to reduce the number of key comparisons from which of the following? a. heap son b merge sort c. selection sort d. All of the above It can be shown that the average number of swaps for insertion sort is a. O(n) b. O(n^2) c. O(n log (n) d. O(n^2 log n) The quick sort algorithm uses the _____ technique to sort a list. a. derived and conquer b. hash c. traversal d. Nose of the above Quick sort uses _____ for implementation. a. recursion b. traversal c heaps d. queues From the figure above, it is clear that in the merge sort algorithm, most of the sorting work is done in _____ sublists. a creating the b splitting the c. merging the sorted d a and b Heap sort, for array-based lists, is of the order _____ even in the worst case. a. O(log n) b. O(n log_2n) c. O(log_2n) d. O(n log_2n) Heap sort overcomes the worst case for _____. a. merge sort b quick sort c. stack sort d. a and e A _____ is a list in which each element contains a key, such that the key in the element at position k in the list is at least as large as the key in the element at position 2k + 1 (if it exists), and 2k + 2 (if it exists). a queue b. stack c. heap d. circular array Merge sort divides the list _____ sublists of nearly equal size. a. two b. three c. four d. a and e In the figure above the root node is _____. a A b. B c. C d. D There is a unique path from the _____ to every node in the binary tree. a branch b. root c. pointer d. info The _____ of a node in a binary tree is the number of branches on the path from the root to the node. a. level b. height c. width d. depth The _____ of a binary tree is the number of nodes on the longest path from the root to a leaf. a level b. height c. width d. depth
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
