D1 January 2013 Q2

EdexcelOld spec6 marksAlgorithms

2.

(a) Starting with a list of all the letters of the alphabet in alphabetical order, demonstrate how a binary search is used to locate the letter P. In each iteration, you must make clear your pivot and the part of the list you are retaining. (4)
(b) Find the maximum number of iterations needed to locate any particular letter of the alphabet. Justify your answer. (2)