Genpact interview question

Explain Binary Search with its implementation.