What is a binary search algorithm?