BlackRock Interview Question

write a binary search method