14
Using binary search (mid = ⌊(low + high)/2⌋) on the sorted array [2, 7, 8, 11, 14, 23, 27, 31, 35, 39], how many comparisons with array elements are needed to find 31?
Medium
Using binary search (mid = ⌊(low + high)/2⌋) on the sorted array [2, 7, 8, 11, 14, 23, 27, 31, 35, 39], how many comparisons with array elements are needed to find 31?
Log in to join the discussion.