binary search example using divide and conquer method