Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
Q 1/9
Score 0
A binary search algorithm works on the principle of _____?
30
divide and conquer
convert to binary and search
divide and convert to binary
sequential search
Q 2/9
Score 0
Which of the following conditions must be true in order to search for a value using binary search?
I. The values in the array must be integers.
II. The values in the array must be in sorted order.
III. The array must not contain duplicate values.
30
I and II
II and III
II only
I only.
Q 3/9
Score 0
Which will cause the shortest execution of a binary search looking for a value in an array of integers?
30
The value isn't in the array
The value is in the middle of the array
The value is the last one in the array
The value is the first one in the array
Q 4/9
Score 0
Under what condition will an insertion sort execute faster?
30
It will always take the same amount of time to execute
If the data is already sorted in ascending order
If the data is already sorted in descending order
Q 5/9
Score 0
Under what condition will a selection sort execute faster?
30
It will always take the same amount of time to execute
If the data is already sorted in descending order.
If the data is already sorted in ascending order.
Q 6/9
Score 0
Suppose you have the following sorted list [3, 5, 6, 8, 11, 12, 14, 15, 17, 18] and are using the recursive binary search algorithm. Which group of numbers correctly shows the sequence of comparisons used to find the key 8.
30
18, 12, 6, 8
12, 6, 11, 8
11, 5, 6, 8
3, 5, 6, 8
Q 7/9
Score 0
How many comparisons would it take to find the value 2 in the following list using a binary search?
{1, 3, 7, 8, 5, 2, 9}
30
Not possible
0
3
2
Q 8/9
Score 0
How many binary searches will it take to find the value 6 in the list [1,3,6,8,10,12]?
30
2
1
3
0
Q 9/9
Score 0
How out of 10 will you rate our presentation and quiz?
30
10
9.8
9.7
9.9
9 questions
Q.A binary search algorithm works on the principle of _____?
1
30 sec
Q.Which of the following conditions must be true in order to search for a value using binary search?
I. The values in the array must be integers.
II. The values in the array must be in sorted order.
III. The array must not contain duplicate values.
2
30 sec
Q.Which will cause the shortest execution of a binary search looking for a value in an array of integers?
3
30 sec
Q.Under what condition will an insertion sort execute faster?
4
30 sec
Q.Under what condition will a selection sort execute faster?
5
30 sec
Q.Suppose you have the following sorted list [3, 5, 6, 8, 11, 12, 14, 15, 17, 18] and are using the recursive binary search algorithm. Which group of numbers correctly shows the sequence of comparisons used to find the key 8.
6
30 sec
Q.How many comparisons would it take to find the value 2 in the following list using a binary search?
{1, 3, 7, 8, 5, 2, 9}
7
30 sec
Q.How many binary searches will it take to find the value 6 in the list [1,3,6,8,10,12]?
8
30 sec
Q.How out of 10 will you rate our presentation and quiz?