Pergunta de entrevista da empresa Pawan Kumar

How does a binary search algorithm work?