ThousandEyes interview question

how to use binary search