Data Structures

1:

If the binary search algorithm determines that the search argument is in the lower half of the array, which of the following statements will, set the appropriate variable to the appropriate value?

A.

start Sub = middle Sub - 1;

B.

start Sub = middle Sub + 1;

C.

stop Sub = middle Sub - 1;

D.

stop Sub = middle Sub + 1.

 

Answer : B

Explanation :

rohit said: (3:47pm on Tuesday 2nd July 2013)
answer should be b, as the search argument is in lower half so start sub= middle sub 1

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.