Domanda di colloquio di FactSet

How would you implement binary search?