Adobe interview question

implement binary search