Exam 10: Sorting Algorithms

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Assuming the priority queue is implemented as a heap, the first step is to insert the new element in the ____ available position in the list.

(Multiple Choice)
4.9/5
(37)

A sorting algorithm makes key comparisons and also moves the data.

(True/False)
4.9/5
(42)

Quicksort first selects an element in the list, called the ____, and then partitions the list so that the elements in one sublist are less than pivot.

(Multiple Choice)
4.9/5
(43)

In the mergesort presented in this chapter, every time we move a node to the merged list, we advance either first1 or first2 to the previous node.

(True/False)
4.8/5
(36)

When converting the subtree into a heap, if the root node of the subtree is larger than the larger child, we swap the root node with the larger child.

(True/False)
4.8/5
(36)

On average, quicksort is of the order ____.

(Multiple Choice)
4.8/5
(38)

In quicksort, the list is partitioned in such a way that combining the sorted lowerSublist and upperSublist is trivial.

(True/False)
4.9/5
(38)
Showing 41 - 47 of 47
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)