CAPE Computer Science Unit 2 · 2012 · Paper 2 · Question 4(b)
A function binarySearch(arr, n, key) searches an integer array arr of size n for key, returning its index or -1 if not found.
Describe three tests that can be used to determine if binarySearch is working correctly.
The mark scheme is shown once you've answered.
Practise this question