Question d’entretien chez Google

write a binary search code to search through a sorted array