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
A binary search begins by examining the ________ element of an array.
(Multiple Choice)
4.9/5
(72)
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.
(True/False)
4.7/5
(67)
The ________ sort usually performs more exchanges than the ________ sort.
(Multiple Choice)
4.9/5
(97)
If a selection sort is used to arrange the numbers 7 5 3 9 2 6 in ascending order, what order will the data be in after the first pass?
(Multiple Choice)
4.9/5
(74)
To find a value in an ordered array of 100 items, how many values must binary search examine at most?
(Multiple Choice)
4.7/5
(64)
When searching for a particular object in an array of objects, it is necessary to compare the search key to the value in each examined object's key field.
(True/False)
4.8/5
(79)
To determine that an item is not in an unordered array of 100 items, how many values must linear search examine on average?
(Multiple Choice)
4.8/5
(68)
When sorting an array of objects or structures, one must decide which data item to sort on.
(True/False)
5.0/5
(76)
If a selection sort is used to arrange the numbers 8 6 4 9 3 7 in ascending order, what order will the data be in after the first pass of the sort is completed?
(Multiple Choice)
4.7/5
(74)
Selection sort requires ________ passes to put n data items in order.
(Multiple Choice)
4.8/5
(75)
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
(Multiple Choice)
4.8/5
(79)
To find a value that is in an unordered array of 50 items, how many values must linear search examine on average?
(Multiple Choice)
4.8/5
(83)
To find a value that is in an unordered array of 100 items, how many values must linear search examine on average?
(Multiple Choice)
4.9/5
(83)
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.8/5
(78)
To determine that a value is not present in an unordered array of 50 items, how many values must linear search examine on average?
(Multiple Choice)
4.8/5
(76)
If a bubble sort is used to arrange the numbers 8 6 4 9 3 7 in ascending order, what order will the data be in after the first pass of the sort is completed?
(Multiple Choice)
4.7/5
(71)
To find a value in an ordered array of 50 items, how many values must binary search examine at most.
(Multiple Choice)
4.8/5
(84)
If a binary search is used to search for the number 4 in the 11-element array shown here int A[] = {1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 17};
Which value will the 4 be compared to first?
(Multiple Choice)
4.8/5
(84)
If a bubble sort is used to arrange the numbers 7 5 3 9 2 6 in ascending order, what order will the data be in after the first pass?
(Multiple Choice)
4.8/5
(64)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)