Domanda di colloquio di Cognizant

Explain binary search and write it's code