What is a search algorithm?
An algorithm for finding an item in a list
An algorithm for finding an item in code
Code for finding an item in a list
When does the linear search algorithm stop?
When the end of the list has been reached
When the search term is found, or the end of the list is reached
When the search term has been found
With a data set of 0,1,3,5,7,8,9 how many values would a binary search examine before it found the value 8?
Two
Six
Five
What is important to know about the data for binary search?
The data can only be numbers
The data in the list must be in order
The data can only be letters
Which search algorithm is more efficient for longer, ordered lists?
Binary search
Linear search
Binary search and linear search are equally efficient
What is a sorting algorithm?
An algorithm for saving programming code
An algorithm for organising data into alphabetical order
An algorithm for organising data into a particular order in a list
With a data set of 0,1,3,5,7,8,9 how many values would a linear search examine before it found the value 5?
Four
Why does merge sort reduce lists to one item?
It makes it easier to merge
It uses less memory for just one item
A single item will always be in the right order
Which sorting algorithm is more efficient with longer lists of data?
Bubble sort
Merge sort
Bubble sort and merge sort are both equally efficient
Why might a sorting algorithm be needed before a search?
The search algorithm may be in the code before the sorting algorithm
The search algorithm may need the data to be in order
Data always needs to be in order before searching