# Binary searching and sorting

## Quiz by Maitha Rashed

### Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

9 questions
• Q1
A binary search algorithm works on the principle of _____?
divide and conquer
convert to binary and search
divide and convert to binary
sequential search
30s
• Q2
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.
I and II
II and III
II only
I only.
30s
• Q3
Which will cause the shortest execution of a binary search looking for a value in an array of integers?
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
30s
• Q4
Under what condition will an insertion sort execute faster?
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
30s
• Q5
Under what condition will a selection sort execute faster?
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.
30s
• Q6
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.
18, 12, 6, 8
12, 6, 11, 8
11, 5, 6, 8
3, 5, 6, 8
30s
• Q7
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}
Not possible
0
3
2
30s
• Q8
How many binary searches will it take to find the value 6 in the list [1,3,6,8,10,12]?
2
1
3
0
30s
• Q9
How out of 10 will you rate our presentation and quiz?
10
9.8
9.7
9.9
30s

Teachers give this quiz to your class