Question d’entretien chez FactSet

How would you implement binary search?