Problem: Implement Binary search on a general Array and also print the total number of comparison done. Assumes the array is sorted in acceding order. Return -1 if number is not found.

I think that Binary search is best implemented recursively.

Sources

  • me