NEW
Font size
Worksheetslaila comel tummy busuk
Total questions: 20
Worksheet time: 11mins
What would the list [9, 6, 12, 7, 3, 16, 10] look like after one iteration of the Bubble sort algorithm (smallest to biggest)?
[6, 9, 7, 3, 12, 10, 16]
[3, 9, 6, 12, 7, 16, 10]
[3, 6, 7, 9, 10, 12, 16]
[9, 6, 12, 3, 7, 16, 10]
Which of the following is NOT an advantage of a bubble sort?
It is a very small and simple computer program
There is only one task to perform
It is very quick
Which type of lists are linear search algorithms used for?
sorted lists
unsorted lists
What would be needed if searching algorithms didn't exist?
The data would need to be saved
Each item of data would need to be looked at one by one, until the searched for data was found
A new set of data to look at would be needed
What is a binary search?
Each item is checked in order
The list is split into 2 and compared
The first 2 values are compared and moved
Nothing happens
Which type of search algorithm is this?
binary
linear
What is an advantage of a binary search
It's very quick
It only works with ordered lists
It is a simple algorithm
What does a linear search do?
Looks at the first item of data, then each one in turn, until it finds the data item requested
Organizes the data into alphabetical order
Splits the data until the requested data is found
Which one of the following is an advantage of a linear search?
It takes a long time to find the item.
It is a simple algorithm to write.
It is more efficient than a binary search.
It is a complex algorithm to write.
A linear search is to be performed on the list:
12, 6, 8, 1, 3
How many searches would it take to find the number 1?
1
2
3
4
Which of these is NOT a Sort algorithm
Binary
Merge
Bubble
Insertion
What is the biggest disadvantage of a binary search?
It can only be used if the data is sorted into an order
It takes the data and keeps dividing it in half until it finds the item it is looking for
It is slow
What does a searching algorithm do?
Search through a set of data
Save a set of data
Help to organise data
What is an advantage of a linear search?
It is very quick
It only works with ordered lists
It is a simple algorithm
A binary search algorithm will only work on a list which is in order. True or False
true
false
Which type of sort algorithm is this?
bubble
merge
insertion
Why does a bubble sort do a final pass even when the data is in the correct order?
To save the data
It does not recognise that the data is in order until the final pass requires no changes
It needs to do this to put the data back in to a list
Using a binary search why will the number 9 never be found in the following list:
11, 8, 13, 9, 7, 3
It does not work on numbers
It only works on letters
The list is not in order
Which type of search algorithm is this?
binary
linear
We are sorting the following list in ascending order:
1 4 2 9 3 8 5
What does the list look like after one pass of the bubble sort algorithm.
1 2 4 3 8 5 9
1 4 2 5 3 8 9
4 2 9 3 8 5 1
