2nd assignment from CS146 to implement Binary Search