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'.
36 exam-style questions on OCR GCSE Computer Science Searching and sorting algorithms. Each one has a worked solution and a mark scheme showing where the marks go.