Answer by OmG for How many comparisons needed in binary search of this array?
As the size of the left array is even, each algorithm could select one of the middle numbers. Hence, the comparison could be like the following with 4 comparison: [4, 13, 25, 33, 38, 41, 55, 71, 73,...
View ArticleHow many comparisons needed in binary search of this array?
We have the following array: [4, 13, 25, 33, 38, 41, 55, 71, 73, 84, 86, 92, 97] To me it seems like there are only 3 comparisons needed to find 25, because: First we pick the middle element 55. Now...
View Article
More Pages to Explore .....