Question 29 1 pts Which of the following is NOT a step in the heapsort algorithm that sorts an unsorted array of length
Posted: Sun May 15, 2022 1:58 pm
Question 29 1 pts Which of the following is NOT a step in the heapsort algorithm that sorts an unsorted array of length n? Convert all subtrees at the level above the leaves to heaps. O Partition the next level up around a pivot index that separates the sorted heaps from the unsorted heaps. Iteratively swap the root element with the last element n times. O Shrink the array size by one for each swap.
Question 30 1 pts What is the meaning of "fixing a max-heap"? Convert from an array to a linked list which obeys heap rules. Convert from a linked list to an array which obeys heap rules. Ensuring no node has children larger than it. O Moving the biggest element to the top of the heap.
Question 30 1 pts What is the meaning of "fixing a max-heap"? Convert from an array to a linked list which obeys heap rules. Convert from a linked list to an array which obeys heap rules. Ensuring no node has children larger than it. O Moving the biggest element to the top of the heap.