Exam 9: Searching, Sorting, and Algorithm Analysis
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C++40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions37 Questions
Exam 5: Looping38 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays37 Questions
Exam 9: Searching, Sorting, and Algorithm Analysis36 Questions
Exam 10: Pointers50 Questions
Exam 11: More About Classes and Object-Oriented Programming64 Questions
Exam 12: More on C-Strings and the String Class38 Questions
Exam 13: Advanced File and Io Operations38 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions20 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library STL40 Questions
Exam 17: Linked Lists38 Questions
Exam 18: Stacks and Queues36 Questions
Exam 19: Binary Trees37 Questions
Select questions type
The sort usually performs more exchanges than the sort.
Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
C
When an array is sorted from highest to lowest, it is said to be in order.
Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
E
If the item being searched for is not in the array, binary search stops looking for it and reports that it is not there when
Free
(Multiple Choice)
5.0/5
(33)
Correct Answer:
B
To locate a value in an ordered array of 50 items, binary search must examine at most values.
(Multiple Choice)
4.9/5
(33)
A sorting algorithm can be used to arrange a set of in order.
(Multiple Choice)
4.8/5
(42)
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.
(True/False)
4.7/5
(43)
When sorting an array of objects, if the values in the data member being sorted on are out of order for two objects, it is necessary to
(Multiple Choice)
4.8/5
(31)
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.
(True/False)
4.7/5
(34)
If a binary search is used to search for the number 4 in the 11- element array shown below, which value will the 4 be compared to first? 

(Multiple Choice)
4.9/5
(34)
A ________search uses a loop to sequentially step through an array.
(Multiple Choice)
4.9/5
(39)
To determine that a value is not present in an unordered array of 50 items, linear search must examine an average of values.
(Multiple Choice)
4.8/5
(25)
When searching for an item in an unordered set of data, binary search can find the item more quickly than linear search.
(True/False)
4.7/5
(28)
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
(Multiple Choice)
4.7/5
(41)
The linear search is adequate for searching through arrays, but not through ones.
(Multiple Choice)
4.8/5
(34)
Selection sort requires passes to put n data items in order.
(Multiple Choice)
4.9/5
(41)
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.
(True/False)
4.8/5
(32)
We can measure the complexity of an algorithm that solves a computational problem by determining the number of for an input of size n.
(Multiple Choice)
4.9/5
(32)
To find a value that is in an unordered array of 100 items, linear search must examine an average of values.
(Multiple Choice)
4.7/5
(30)
Showing 1 - 20 of 36
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)