Dozee Interview Question

Explain the binary search algorithm.