Pregunta de entrevista de FactSet

How would you implement binary search?