Bloomberg Interview Question

Write a function for binary search