binary search using divide and conquer method