Our site uses cookies. Some of the cookies we use are essential for parts of the site to operate and have already been set. You may delete and block all cookies from this site, but parts of the site will not work. To find out more about cookies on this website, see our Cookie Policy
Accept
© eRevision.uk and ZigZag Education 2025
This test is run by .
Note that your final mark will not be saved in the system.

4 - Algorithms Typeit

Target Level
C
Running Total
0
0%
Attempt
1 of 3

Type the correct answers into the spaces. Fill all the spaces before clicking ‘Check Answers!’

A poorly-conceived binary search

The following array was subject to a binary search.  This was a poorly-chosen algorithm, since the elements within the array are not in order. The algorithm works under the assumption that the array is in ascending numerical order.

10 23 2 32 16 30 28 1 22 4 33 7 24 12 13 27 15 25 9 6 18 11 26 5 21 31 19 14 29 3 17 20 8

During each iteration, the first step is to identify the midpoint.  If the current search field has an  number of values, the midpoint is simply the one in the middle.  With an  number of values, there would be two values in the middle, and the midpoint is taken as being the one on the left.

Write out, in order, the values that would be encountered in an attempt to find the number 14.

- - - - -

This is your 1st attempt! You get 3 marks for each one you get right. Good luck!

Pass Mark
69%