__________ is the process of arranging a list of items into a defined order based on
some criteria.
A) searching
What type does “compareTo” return?
D) char
Which of these have the smallest time complexity?
A) Insertion sort
_______ orders a list of values by repetitively comparing neighboring elements and
swapping their positions if necessary.
A) Insertion sort
The _____ sort algorithm sorts a list by recursively dividing the list in half until each sub–
list has one element and then merging these sub-lists into the sorted order.
D) Lazy
This type of sequential sort algorithm sorts a list by repeatedly placing the next smallest
element into its final sorted position.
A) insertion sort
The best comparison sort in terms of order is:
A) O(1)
Which sort method starts by repeatedly splitting the list in half?
A) Bubble sort
What is the time complexity of a Quick sort?
A) 2logn
Merge Sort has time complexity O(___).
A) O(n^2)
After one pass on the numbers ( 5 3 9 5 ), what would be the result if you were to use
Bubble Sort?
A) 5 3 5 9
__<searching>__ is the process of finding a designated target within a group of items or
determining that it doesn’t exist.
Searching is the process of finding a designated target within a group of items or
search pool.
some criteria.
particular value into its final, sorted, position.
The __<insertion>__ sort algorithm sorts a list of values by repetitively inserting a
particular value into a subset of the list that has already been sorted.
The __<bubble>__ sort algorithm sorts a list by repeatedly comparing neighboring
elements and swapping them if necessary.
sorting the two partitions.
The __<merge>__ sort algorithm sorts a list by recursively dividing the list in half until
each sublist has one element and then merging these sub-lists into the sorted order.
When would a linear search be preferable over a binary search?
Small data sets or when the data set is not sorted.
Show the steps of an Insertion Sort for the numbers ( 5 3 9 5 ).
True/False. An efficient search maximizes the number of comparisons made.
True/False. A binary search capitalizes on the fact that the list is not sorted.
large search pool.
a particular value into its final, sorted, position.
Searching is the process of finding a designated target within a group of items or
determining that it doesn’t exist.
An efficient search minimizes the number of comparisons made.
A method is made static by using the static modifier in the method declaration.
Sorting is the process of arranging a list of items into a defined order based on some
criteria.
particular value into its final, sorted, position.
True/False. The insertion sort algorithm sorts a list by repeatedly comparing
neighboring elements and swapping them if necessary.
True/False. The bubble sort algorithm sorts a list of values by repetitively inserting a
particular value into a subset of the list that has already been sorted.
True/False. The quick sort algorithm sorts a list by partitioning the list and then
recursively sorting the two partitions.
until each sublist has one element and then merging these sub-lists into the sorted
order.
When would a linear search be preferable to a logarithmic search?
Which searching method requires that the list be sorted?
When would a sequential sort be preferable to a recursive sort?
The insertion sort algorithm sorts using what technique?
The bubble sort algorithm sorts using what technique?
The selection sort algorithm sorts using what technique?
The quick sort algorithm sorts using what technique?
The merge sort algorithm sorts using what technique?
How many queues would it take to use a radix sort to sort names stored as all
lowercase?