NEW
Font size
S
M
L
XL
WorksheetsGCSE J277 - Searching and Sorting Mega Quiz
Total questions: 40
Worksheet time: 20mins
Name
Class
Date
1.
A binary search works by
a)
Only searching 0 and 1
b)
Spliting data in half each time when searching
c)
Checking every item sequentially
d)
Randomly searching for an item
2.
A linear search works by
a)
Only searching 0 and 1
b)
Spliting data in half each time when searching
c)
Checking every item sequentially
d)
Randomly searching for an item
3.
What formula is needed for a binary search
a)
n + 1 / 2
b)
(n + 1) / 2
c)
n / 2 + 1
d)
n + (1 / 2)
4.
In this list, what is the first item checked in a binary search: 1, 3, 5, 6, 7, 8, 9
a)
1
b)
6
c)
8
d)
9
5.
In this list, what is the first item checked in a linear search: 1, 3, 5, 6, 7, 8, 9
a)
1
b)
6
c)
8
d)
9
6.
What's the minimum number of searchings using a linear search on: 1, 3, 5, 6, 7, 8, 9
a)
1
b)
2
c)
3
d)
7
7.
What's the minimum number of searchings using a binary search on: 1, 3, 5, 6, 7, 8, 9
a)
1
b)
2
c)
3
d)
7
8.
What's the maximum number of searchings using a linear search on: 1, 3, 5, 6, 7, 8, 9
a)
1
b)
2
c)
3
d)
7
9.
What's the maximum number of searchings using a binary search on: 1, 3, 5, 6, 7, 8, 9
a)
1
b)
2
c)
3
d)
7
10.
Which searching algorithm needs data to be in order
a)
Linear
b)
Binary
11.
What is the best description for a linear search
a)
Put elements in order, check each one in turn
b)
Elements in order, compare middle value, 1/2 list and repeat
c)
Elements do not need to be in order, check each item in term
d)
Data not need to be in order, compare middle value, repeat
12.
What is the best description for a binary search
a)
Put elements in order, check each one in turn
b)
Elements in order, compare middle value, 1/2 list and repeat
c)
Elements do not need to be in order, check each item in term
d)
Data not need to be in order, compare middle value, repeat
13.
Which algorithm is more complicated to program
a)
Linear Search
b)
Binary Search
14.
A precondition for a binary search
a)
Data must be binary
b)
Data must be even numbers
c)
Data is in order
d)
Data is linear
15.
number of comparisons with linear search needed to find 1 on this list: 12, 6, 8, 1, 3
a)
1
b)
2
c)
3
d)
4
16.
Advantage of using a linear search
a)
Performs well on a large list
b)
Data does not need to be in order
c)
Can only work on ordered lists
d)
Slow with large data sets
17.
Disadvantage of using a linear search
a)
Performs well on a large list
b)
Data does not need to be in order
c)
Can only work on ordered lists
d)
Slow with large data sets
18.
Advamtage of using a binary search
a)
Performs well on a large list
b)
Data does not need to be in order
c)
Can only work on ordered lists
d)
Slow with large data sets
19.
Disadvantage of using a binary search
a)
Performs well on a large list
b)
Data does not need to be in order
c)
Can only work on ordered lists
d)
Slow with large data sets
20.
Which searching algorithm doesn't need data to be in order
a)
Linear
b)
Binary
21.
Which of the following is not a sorting algorithm
a)
Bubble
b)
Insertion
c)
Binary
d)
Merge
22.
Goes through a list repeatedly, swapping elements in the wrong order
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
23.
Splits list into individual lists, combining them back together in order 2 at a time
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
24.
Take each item in turn, compare to the items in the sorted list and place in the correct order
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
25.
First action is to mark the first item as the ordered list
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
26.
Which algorithm needs to go through a list multiple times
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
27.
Which one splits a list into individual lists
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
28.
What is the purpose of a sorting algorithm
a)
Find an item in a dataset
b)
Save an item in a dataset
c)
Order items in a dataset
d)
Remove an item in a dataset
29.
What does ascending mean
a)
Lowest to Highest
b)
Highest to Lowest
30.
What does descending mean
a)
Lowest to Highest
b)
Highest to Lowest
31.
How many passes will a bubble sort do
a)
Only one pass
b)
Two Passes
c)
Several passes, until data is fully ordered
d)
Forever
32.
How many passes will a merge sort do
a)
Only one pass
b)
Two Passes
c)
Several passes, until data is fully ordered
d)
Forever
33.
How many passes will an insertion sort do
a)
Only one pass
b)
Two Passes
c)
Several passes, until data is fully ordered
d)
Forever
34.
Which sorting algorithm makes many pointless comparisons
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
35.
This algorithm finishes when no more swaps are made
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
36.
Best used on very large data sets
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
37.
Best used on very small data sets
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
38.
Useful for inserting items into an already ordered list
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
39.
What does ascending mean
a)
A-Z
b)
Z-A
40.
What does descending mean
a)
A-Z
b)
Z-A
Reset
