Exam 9: Searching, Sorting, Algorithm Analysis
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C Plus Plus40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions40 Questions
Exam 5: Looping40 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays40 Questions
Exam 9: Searching, Sorting, Algorithm Analysis40 Questions
Exam 10: Pointers62 Questions
Exam 11: More About Classes and Object-Oriented Programming70 Questions
Exam 12: More on C-Strings and the String Class40 Questions
Exam 13: Advanced File and Io Operations40 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions22 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 Trees38 Questions
Select questions type
The advantage of a linear search is that
Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
E
Using a binary search, you are more likely to find an item than if you use a linear search.
Free
(True/False)
4.9/5
(39)
Correct Answer:
False
A ________ search uses a loop to sequentially step through an array.
(Multiple Choice)
4.7/5
(38)
A(n) ________ search is more efficient than a(n) ________ search.
(Multiple Choice)
4.8/5
(26)
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.8/5
(38)
The ________ search is adequate for searching through small arrays, but not through large ones.
(Multiple Choice)
4.7/5
(38)
Using a linear search, you are more likely to find an item than if you use a binary search.
(True/False)
4.9/5
(33)
When an array is sorted from highest to lowest, it is said to be in ascending order.
(True/False)
4.8/5
(39)
The ________ sort usually performs fewer exchanges than the ________ sort.
(Multiple Choice)
4.8/5
(35)
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
(33)
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.9/5
(29)
Bubble sort and selection sort can also be used with STL vectors.
(True/False)
4.8/5
(36)
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.9/5
(29)
A sorting algorithm can be used to arrange a set of ________ in ________ order.
(Multiple Choice)
4.9/5
(35)
We can estimate the ________ of an algorithm by counting the number of basic steps it requires to solve a problem.
(Multiple Choice)
4.8/5
(36)
The linear search is adequate for searching through ________ arrays, but not through ________ ones.
(Multiple Choice)
4.9/5
(39)
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
(43)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)