Deck 8: Recursion

Full screen (f)
exit full mode
Question
__________ is the process of arranging a list of items into a defined order based on some criteria.

A) searching
B) categorizing
C) classifying
D) sorting
Use Space or
up arrow
down arrow
to flip the card.
Question
What type does "compareTo" return?

A) int
B) String
C) boolean
D) char
Question
Which of these have the smallest time complexity?

A) Insertion sort
B) Quick Sort
C) Bubble Sort
D) Selection Sort
Question
_______ orders a list of values by repetitively comparing neighboring elements and swapping their positions if necessary.

A) Insertion sort
B) Quick Sort
C) Bubble Sort
D) Selection Sort
Question
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.

A) Merge
B) Quick
C) Linear
D) Lazy
Question
This type of sequential sort algorithm sorts a list by repeatedly placing the next smallest element into its final sorted position.

A) insertion sort
B) bubble sort
C) selection sort
D) merge sort
Question
The best comparison sort in terms of order is:

A) O(1)
B) O(n)
C) O(log(n))
D) O(nlog(n))
Question
Which sort method starts by repeatedly splitting the list in half?

A) Bubble sort
B) Insertion sort
C) Merge sort
D) selection sort
Question
What is the time complexity of a Quick sort?

A) 2logn
B) logn
C) nlogn
D) n^2
Question
Merge Sort has time complexity O(___).

A) O(n^2)
B) b)O(n)
C) c)O(nlog(n))
D) d)O(n^2)
Question
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
B) 5 5 3 9
C) 3 5 5 9
D) 9 5 5 3
Question
______ is the process of finding a designated target within a group of items or determining that it doesn't exist.
Question
An efficient search ______ the number of comparisons made.
Question
If a class implements Comparable, it must have a ______ method.
Question
A ______ search eliminates half of the search pool with each step and thus is O(____) as long as the search pool is ____.
Question
Searching is the process of finding a designated target within a group of items or determining that it ______.
Question
A method is made static by using the ______ modifier in the method declaration.
Question
A ______ search capitalizes on the fact that the search pool is sorted.
Question
A binary search eliminates ______ of the viable candidates with each comparison.
Question
A binary search has ______ complexity, making it very efficient for a large search pool.
Question
______ is the process of arranging a list of items into a defined order based on some criteria.
Question
The ______ sort algorithm sorts a list of values by repetitively putting a particular value into its final, sorted, position.
Question
The ______ sort algorithm sorts a list of values by repetitively inserting a particular value into a subset of the list that has already been sorted.
Question
The ______ sort algorithm sorts a list by repeatedly comparing neighboring elements and swapping them if necessary.
Question
The ______ sort algorithm sorts a list by partitioning the list and then recursively sorting the two partitions.
Question
The ______ 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.
Question
A ______ sort is inherently based on queue processing.
Question
Bubble, Selection and Insertion sort all have time complexity of O(____)..
Question
When would a linear search be preferable over a binary search?
Question
Show the steps of an Insertion Sort for the numbers ( 5 3 9 5 ).
Question
Show the steps of a Selection Sort for the numbers ( 5 3 9 5 ).
Question
An efficient search maximizes the number of comparisons made.
Question
A binary search capitalizes on the fact that the list is not sorted.
Question
A binary search can only be performed if the search pool is sorted
Question
Linear search has logarithmic complexity, making it very efficient for a large search pool.
Question
Bubble, Selection and Insertion sort all have time complexity of O(n)..
Question
Searching is the process of finding a designated target within a group of items or determining that it doesn't exist.
Question
An efficient search minimizes the number of comparisons made.
Question
A method is made static by using the static modifier in the method declaration.
Question
A binary search capitalizes on the fact that the search pool is sorted.
Question
A binary search eliminates half of the viable candidates with each comparison.
Question
A binary search has logarithmic complexity, making it very efficient for a large search pool.
Question
Sorting is the process of arranging a list of items into a defined order based on some criteria.
Question
The insertion sort algorithm sorts a list by repeatedly comparing neighboring elements and swapping them if necessary.
Question
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.
Question
The quick sort algorithm sorts a list by partitioning the list and then recursively sorting the two partitions.
Question
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.
Question
A radix sort is Order(n2).
Question
When would a linear search be preferable to a logarithmic search?
Question
Which searching method requires that the list be sorted?
Question
When would a sequential sort be preferable to a recursive sort?
Question
The insertion sort algorithm sorts using what technique?
Question
The bubble sort algorithm sorts using what technique?
Question
The selection sort algorithm sorts using what technique?
Question
The quick sort algorithm sorts using what technique?
Question
The merge sort algorithm sorts using what technique?
Question
How many queues would it take to use a radix sort to sort names stored as all lowercase?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/57
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 8: Recursion
1
__________ is the process of arranging a list of items into a defined order based on some criteria.

A) searching
B) categorizing
C) classifying
D) sorting
sorting
2
What type does "compareTo" return?

A) int
B) String
C) boolean
D) char
int
3
Which of these have the smallest time complexity?

A) Insertion sort
B) Quick Sort
C) Bubble Sort
D) Selection Sort
Quick Sort
4
_______ orders a list of values by repetitively comparing neighboring elements and swapping their positions if necessary.

A) Insertion sort
B) Quick Sort
C) Bubble Sort
D) Selection Sort
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
5
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.

A) Merge
B) Quick
C) Linear
D) Lazy
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
6
This type of sequential sort algorithm sorts a list by repeatedly placing the next smallest element into its final sorted position.

A) insertion sort
B) bubble sort
C) selection sort
D) merge sort
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
7
The best comparison sort in terms of order is:

A) O(1)
B) O(n)
C) O(log(n))
D) O(nlog(n))
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
8
Which sort method starts by repeatedly splitting the list in half?

A) Bubble sort
B) Insertion sort
C) Merge sort
D) selection sort
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
9
What is the time complexity of a Quick sort?

A) 2logn
B) logn
C) nlogn
D) n^2
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
10
Merge Sort has time complexity O(___).

A) O(n^2)
B) b)O(n)
C) c)O(nlog(n))
D) d)O(n^2)
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
11
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
B) 5 5 3 9
C) 3 5 5 9
D) 9 5 5 3
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
12
______ is the process of finding a designated target within a group of items or determining that it doesn't exist.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
13
An efficient search ______ the number of comparisons made.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
14
If a class implements Comparable, it must have a ______ method.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
15
A ______ search eliminates half of the search pool with each step and thus is O(____) as long as the search pool is ____.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
16
Searching is the process of finding a designated target within a group of items or determining that it ______.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
17
A method is made static by using the ______ modifier in the method declaration.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
18
A ______ search capitalizes on the fact that the search pool is sorted.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
19
A binary search eliminates ______ of the viable candidates with each comparison.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
20
A binary search has ______ complexity, making it very efficient for a large search pool.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
21
______ is the process of arranging a list of items into a defined order based on some criteria.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
22
The ______ sort algorithm sorts a list of values by repetitively putting a particular value into its final, sorted, position.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
23
The ______ sort algorithm sorts a list of values by repetitively inserting a particular value into a subset of the list that has already been sorted.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
24
The ______ sort algorithm sorts a list by repeatedly comparing neighboring elements and swapping them if necessary.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
25
The ______ sort algorithm sorts a list by partitioning the list and then recursively sorting the two partitions.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
26
The ______ 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.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
27
A ______ sort is inherently based on queue processing.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
28
Bubble, Selection and Insertion sort all have time complexity of O(____)..
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
29
When would a linear search be preferable over a binary search?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
30
Show the steps of an Insertion Sort for the numbers ( 5 3 9 5 ).
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
31
Show the steps of a Selection Sort for the numbers ( 5 3 9 5 ).
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
32
An efficient search maximizes the number of comparisons made.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
33
A binary search capitalizes on the fact that the list is not sorted.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
34
A binary search can only be performed if the search pool is sorted
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
35
Linear search has logarithmic complexity, making it very efficient for a large search pool.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
36
Bubble, Selection and Insertion sort all have time complexity of O(n)..
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
37
Searching is the process of finding a designated target within a group of items or determining that it doesn't exist.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
38
An efficient search minimizes the number of comparisons made.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
39
A method is made static by using the static modifier in the method declaration.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
40
A binary search capitalizes on the fact that the search pool is sorted.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
41
A binary search eliminates half of the viable candidates with each comparison.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
42
A binary search has logarithmic complexity, making it very efficient for a large search pool.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
43
Sorting is the process of arranging a list of items into a defined order based on some criteria.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
44
The insertion sort algorithm sorts a list by repeatedly comparing neighboring elements and swapping them if necessary.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
45
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.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
46
The quick sort algorithm sorts a list by partitioning the list and then recursively sorting the two partitions.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
47
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.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
48
A radix sort is Order(n2).
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
49
When would a linear search be preferable to a logarithmic search?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
50
Which searching method requires that the list be sorted?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
51
When would a sequential sort be preferable to a recursive sort?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
52
The insertion sort algorithm sorts using what technique?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
53
The bubble sort algorithm sorts using what technique?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
54
The selection sort algorithm sorts using what technique?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
55
The quick sort algorithm sorts using what technique?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
56
The merge sort algorithm sorts using what technique?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
57
How many queues would it take to use a radix sort to sort names stored as all lowercase?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 57 flashcards in this deck.