American Express interview question

how to implement binary search