Index.com interview question

Binary search