Exam 12: Searching and Sorting
Exam 1: Introduction40 Questions
Exam 2: Data and Expressions40 Questions
Exam 3: Using Classes and Objects40 Questions
Exam 4: Conditionals and Loops40 Questions
Exam 5: Writing Classes40 Questions
Exam 6: Graphical User Interfaces40 Questions
Exam 7: Arrays40 Questions
Exam 8: Inheritance40 Questions
Exam 9: Polymorphism39 Questions
Exam 11: Recursion40 Questions
Exam 10: Exceptions40 Questions
Exam 12: Searching and Sorting40 Questions
Exam 13: Trees40 Questions
Exam 14: Introduction to Collections and Stacks40 Questions
Exam 15: Heaps and Priority Queues40 Questions
Exam 16: Graphs40 Questions
Select questions type
Which of the following algorithms has a worst case complexity of O(n log2n)?
(Multiple Choice)
4.8/5
(37)
The __________________ algorithm sorts a list of values by repetitively inserting a particular value into a subset of the list that has already been sorted.
(Multiple Choice)
4.8/5
(32)
Write out the state of the list while being sorted using the selection sort algorithm:


(Essay)
4.7/5
(31)
A linear search always requires more comparisons than a binary search.
(True/False)
4.9/5
(42)
Write a method that accepts an integer array as a parameter and sorts it using the bubble sort algorithm.
(Essay)
4.8/5
(38)
Quick sort works by separating a list into two lists, and recursively sorting the two lists using quick sort.
(True/False)
4.9/5
(33)
If there are more items in a search pool, then it will typically require more comparisons to find an item.
(True/False)
4.9/5
(37)
Which of the following algorithms is most easily expressed recursively?
(Multiple Choice)
4.9/5
(32)
What is the complexity of the following code (in terms of the length of the array)?
for(int i = 0; i < 5; i++)
System.out.println(array[i]);
(Short Answer)
4.8/5
(41)
Which of the following algorithms has a worst-case complexity of O(n2)?
(Multiple Choice)
4.8/5
(45)
With each comparison, a binary search eliminates approximately half of the items remaining in the search pool.
(True/False)
4.7/5
(35)
Write a method that accepts an array of integers as a parameter and sorts them using the selection sort algorithm.
(Essay)
4.8/5
(42)
Bubble sort works by separating a list into two lists, recursively sorting the two lists using bubble sort, and then combining the sorted sublists into a sorted list.
(True/False)
5.0/5
(42)
The ___________________ of an algorithm shows the relationship between the size of the problem and the value we hope to optimize.
(Multiple Choice)
4.9/5
(27)
The selection sort algorithm sorts a list of values by repeatedly putting a particular value into its final, sorted position.
(True/False)
4.9/5
(41)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)