Exam 10: Sorting Algorithms
Exam 1: Software Engineering Principles and C++ Classes42 Questions
Exam 2: Object-Oriented Design OOD and C++35 Questions
Exam 3: Pointers and Array-Based Lists45 Questions
Exam 4: Standard Template Library (STL) I47 Questions
Exam 5: Linked Lists44 Questions
Exam 6: Recursion36 Questions
Exam 7: Stacks44 Questions
Exam 8: Queues48 Questions
Exam 9: Searching and Hashing Algorithms49 Questions
Exam 10: Sorting Algorithms47 Questions
Exam 11: Binary Trees and B-Trees47 Questions
Exam 12: Graphs43 Questions
Exam 13: Standard Template Library (STL) II50 Questions
Select questions type
If the list is stored in a linked list, we can traverse the list in only one direction starting at the first node because the links are only in one direction.
(True/False)
4.8/5
(33)
In a heap, the ____ element of the list is always the first element of the list.
(Multiple Choice)
4.8/5
(29)
In the average case of quicksort, the number of key comparisons is ____.
(Multiple Choice)
4.9/5
(37)
Assuming a priority queue is implemented as a stack, to remove the first element of the priority queue, we copy the last element of the list into the first array position, reduce the length of the list by 1, and restore the heap in the list.
(True/False)
4.7/5
(36)
Mergesort and quicksort are similar in how they partition the list.
(True/False)
4.8/5
(34)
The modified insertion sort introduced in 1959 by D. E. Shell is known as the diminishing return sort.
(True/False)
4.9/5
(43)
____ sort sorts the list by moving each element to its proper place.
(Multiple Choice)
4.9/5
(31)
The____ for array-based lists is of order O(n log2n) even in the worst case, therefore overcoming the worst case of the quicksort.
(Multiple Choice)
4.9/5
(38)
In ____, the elements of the list are viewed as sublists at a particular distance.
(Multiple Choice)
4.8/5
(33)
In heapsort, only the elements at position 2k + 1 are accessed frequently.
(True/False)
4.9/5
(46)
If the list is stored in an array, we can traverse the list in either direction using an ____.
(Multiple Choice)
4.7/5
(34)
Sorted sublists are merged into a sorted list by comparing the elements of the sublists, and then adjusting the references of the nodes with the smaller info.
(True/False)
4.9/5
(34)
After inserting the new element in the heap, the list might no longer be a heap.
(True/False)
4.9/5
(35)
The first step in the heapsort of this chapter is to convert the list into a heap, called ____.
(Multiple Choice)
4.8/5
(27)
With selection sort, we can keep track of the unsorted portion of the list and repeat the steps involved with sorting with the help of a ____ loop.
(Multiple Choice)
4.9/5
(39)
When inserting an element in the priority queue, restoring the heap might result in moving the new entry to the root node.
(True/False)
4.8/5
(43)
A(n) ____ finds the location of the smallest element in the unsorted portion of the list and moves it to the top of the unsorted portion of the list.
(Multiple Choice)
4.9/5
(35)
Showing 21 - 40 of 47
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)