Question: Suppose that binary search is called with input list (3, 7, 13, 18, 24, 29, 31, 33, 41) and target item x = 14. low

Suppose that binary search is called with input list

(3, 7, 13, 18, 24, 29, 31, 33, 41)

and target item x = 14.

low = 1 and high = 9 on the first call to binary search. What are the values for low and high on the third call to binary search?

A) low = 3 and high = 4

B) low = 1 and high = 5

C) low = 3 and high = 5

D) low = 4 and high = 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!