Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
C++ Study Set 1
Quiz 9: Searching, Sorting, and Algorithm Analysis
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
True/False
Bubble sort and selection sort can also be used with STL vectors.
Question 22
Multiple Choice
A binary search begins by examining the _ element of an array.
Question 23
True/False
If algorithm A requires 2n + 1 basic operations to process an input of size n, and Algorithm B requires 3n + 2 basic operations to process the same input, algorithm A is considered to be more efficient than Algorithm B.
Question 24
Multiple Choice
To determine that a item is not in an unordered array of 100 items, linear search must examine an average of values.
Question 25
True/False
When sorting an array of objects or structures, one must decide which data item to sort on.
Question 26
True/False
When sorting an array of objects, if the values in the data member being sorted on are out of order for two objects, those two data values should be swapped.
Question 27
True/False
Using a linear search, you are more likely to find an item than if you use a binary search.
Question 28
Multiple Choice
To determine that a value is not present in an unordered array of 50 items, linear search must examine an average of values.
Question 29
Multiple Choice
To find a value that is in an unordered array of 100 items, linear search must examine an average of values.
Question 30
Multiple Choice
When searching for a particular object in an array of objects, it is necessary to compare the to the value in each examined object's
Question 31
True/False
Any sorting algorithm, such as bubble sort or selection sort, that can be used on data stored in an array can also be used on data stored in a vector.
Question 32
True/False
If algorithm A requires 2n + 1 basic operations to process an input of size n, and Algorithm B requires 3n + 2 basic operations to process the same input, algorithms A and B are considered to be equally efficient.