Searching and sorting algorithms - OCR test questions - OCR

1

Which search examines each data item in turn until a match is made or there are no more items to examine?

2

Which of the following is an advantage of a linear search?

3

Which of the following is a disadvantage of a binary search?

4

Which of these types of sort is the most efficient?

5

Which of these types of sort is the easiest to program?

6

What size data set does an insertion sort work most efficiently with?

7

What size data set should ideally be sorted with a merge sort?

8

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?

9

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?

10

With a data set of 0, 1, 5, 3, 8, 9, 7 how many values would a linear search examine before it found the value 9?