NEW
Font size
WorksheetsPractice for AP Java Quiz #13 Sorting
Total questions: 20
Worksheet time: 12mins
4 5 9 6 2 7
4 5 6 2 7 9
4 5 2 6 7 9
4 8 6 2 5 7
4 8 6 2 5 7
4 6 8 2 5 7
4 8 3 9 2 6
2 8 3 9 4 6
2 3 8 9 4 6
1 4 2 9 3 8 5
What does the list look like after one pass of the bubble sort algorithm.
1 4 2 9 3 8 5
What does the list look like after one pass of the selection sort algorithm.
1 4 2 9 3 8 5
What does the list look like after one pass of the insertion sort algorithm.
11, 8, 13, 9, 7, 3
What algorithm does this image represent?
Bubble sort
Merge sort
Linear search
Binary search
Which of these algorithms eliminates half of its possibilities each time it makes a check?
Binary search
Bubble sort
Merge sort
Linear search
How many elements of the array {4,7,9,11,20,24,30,41} would be visited in a binary search for 27?
2
3
4
5
What is the output of this program?
Not found
Found
12
ArrayIndexOutOfBoundsException
Which of the following is the best replacement for <missing code>?
guess == wrong
low == high
low > high
low < high
Which sorting algorithm is illustrated in this animation?
Bubble Sort
Selection Sort
Insertion Sort
Merge Sort
Which name best matches this code?
Bubble Sort
Selection Sort
Insertion Sort
Merge
2 robots race to find a name in a sorted list. Robot A uses a binary search and Robot B uses linear. Who will win?
Robot A will always win
Robot B will always win
Robot A will probably, but not always, win
Robot B will probably, but not always, win
Which name best matches this code?
Bubble Sort
Selection Sort
Insertion Sort
Merge
