Exam 10: Sorting Algorithms

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

We use ____ to implement mergesort.

Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
Verified

A

In a ____ queue, customers or jobs with higher priorities are pushed to the front of the queue.

Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
Verified

C

Mergesort uses the divide-and-conquer technique to sort a list.

Free
(True/False)
4.9/5
(39)
Correct Answer:
Verified

True

Insertion sort cannot be applied to linked lists.

(True/False)
4.8/5
(36)

In mergesort, all the comparisons are made in the method____, which merges two sorted sublists.

(Multiple Choice)
4.8/5
(39)

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).

(Multiple Choice)
4.7/5
(32)

Selection sort involves the following steps in the unsorted portion of the list: find the location of the smallest element and move the smallest element to the beginning of the unsorted list.

(True/False)
4.8/5
(35)

To divide the list into two sublists, we need to find the ____ node of the list.

(Multiple Choice)
4.9/5
(32)

In a(n) ____, a list is sorted by selecting elements in the list, one at a time, and moving them to their proper positions.

(Multiple Choice)
4.9/5
(39)

In a selection sort, the first step we locate the smallest item in the entire list, the second step we locate the smallest item in the list starting from the second element in the list, and so on.

(True/False)
4.8/5
(39)

When sorting a list, the smallest item must be moved to position 0.

(True/False)
5.0/5
(36)

In a heap, the ____ is the largest element of the tree

(Multiple Choice)
4.8/5
(28)

To ensure that the largest element of the priority queue is always the first element of the queue, we can implement priority queues as ____.

(Multiple Choice)
4.9/5
(29)

Once the sublists are sorted, the next step in mergesort is to merge the sorted sublists.

(True/False)
4.8/5
(35)

A sequential search assumes that the data is in a particular order.

(True/False)
4.9/5
(42)

In quicksort, all the sorting work is done in ____ the list.

(Multiple Choice)
4.8/5
(32)

Initially, in a selection sort we consider that the entire list is unsorted.

(True/False)
4.9/5
(43)

In heapsort, after we convert the array into a heap, the ____ phase begins.

(Multiple Choice)
4.7/5
(42)

Inserting the new element in the first available position in the list ensures that the array holding the list is a complete ____.

(Multiple Choice)
4.9/5
(39)

In a selection sort, we find the largest item in the list first.

(True/False)
4.8/5
(49)
Showing 1 - 20 of 47
close modal

Filters

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