Sailthru Interview Question

Please code out the algorithm for binary search