Exam 16: Searching and Sorting
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
For a list of length n, insertion sort makes ____ item assignments.
(Multiple Choice)
4.7/5
(31)
If you initially declare a vector object and do not specify its size, then in order to add elements to the vector object, we use the function ____________________.
(Short Answer)
4.9/5
(38)
The statement ____ creates the vector object vecList of size size.
(Multiple Choice)
4.8/5
(33)
When moving array values for insertion sort, to move list[4] into list[2], first ____.
(Multiple Choice)
4.8/5
(36)
In the insertion sort function, the variable firstOutOfOrder is initialized to ____, assuming n is the length of the list.
(Multiple Choice)
4.9/5
(31)
The type vector provides the expression ____________________, which returns the last element of the object.
(Short Answer)
4.9/5
(26)
The type vector provides the expression ____________________, which inserts a copy of elem into vecList at the end.
(Short Answer)
4.9/5
(33)
During the sorting phase of insertion sort, the array containing the list is divided into two sublists, sorted and unsorted.
(True/False)
4.7/5
(38)
In a bubble sort for list of length n, the first step is to compare elements ____.
(Multiple Choice)
4.9/5
(44)
In a bubble sort, the smaller elements move toward the bottom, and the larger elements move toward the top of the list.
(True/False)
4.7/5
(33)
The type vector provides the expression ____________________, which returns true if the object vecList is empty and false otherwise.
(Short Answer)
4.9/5
(36)
For sorting a list of length n, bubble sort uses ____ iterations.
(Multiple Choice)
4.9/5
(35)
After the second iteration of bubble sort for a list of length n, the last ____ are sorted.
(Multiple Choice)
4.8/5
(34)
The sequential search algorithm does not assume that the list is sorted.
(True/False)
4.9/5
(37)
The type vector provides the function ____________________, which deletes all elements from the object.
(Short Answer)
4.7/5
(40)
In order to apply a(n) ____________________ search, the list must be sorted.
(Short Answer)
4.8/5
(42)
The type vector provides the expression ____________________, which deletes the last element of vecList.
(Short Answer)
4.9/5
(31)
The first element in a vector object is at location ____________________.
(Short Answer)
4.7/5
(36)
The type vector provides the expression ____________________, which returns the maximum number of elements that can be inserted into the object vecList.
(Short Answer)
4.8/5
(43)
Showing 21 - 40 of 46
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)