16
Using binary search (mid = ⌊(low + high)/2⌋) on the sorted array [3, 7, 8, 14, 15, 20, 23, 35, 39], how many comparisons with array elements are needed to find 7?
DiscussMedium
Loading subject content…
Loading practice questions…
Using binary search (mid = ⌊(low + high)/2⌋) on the sorted array [3, 7, 8, 14, 15, 20, 23, 35, 39], how many comparisons with array elements are needed to find 7?
Using binary search (mid = ⌊(low + high)/2⌋) on the sorted array [3, 7, 11, 15, 19, 23, 27, 32, 35, 39, 41, 47, 51], how many comparisons with array elements are needed to find 19?
Using binary search (mid = ⌊(low + high)/2⌋) on the sorted array [3, 5, 8, 14, 15, 23, 26, 27, 31, 35, 39, 43], how many comparisons with array elements are needed to find 39?