InDebted interview question

Implement an binary search algorithm