A sorted list of celestial bodies registered in a space observatory database is indexed from 0 to 8, as shown below:
| Index | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| Name | Ceres | Earth | Jupiter | Mars | Neptune | Pluto | Saturn | Uranus | Venus |
Using the binary search algorithm with the midpoint formula ⌊L+U2⌋\left\lfloor \frac{L+U}{2} \right\rfloor⌊2L+U⌋, where LLL is the lower bound index and UUU is the upper bound index of the current search interval, show the steps required to locate the entry for 'Venus'.
Practise OCR GCSE Computer Science Searching and sorting algorithms with exam-style questions for GCSE Computer Science. 36 questions, matched to the OCR GCSE Computer Science (J277) specification and written in Component 01 and Component 02 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.