American Express Interview Question

how to implement binary search