Question d’entretien chez Cognizant

Explain binary search and write it's code