Which of the following statements is used in the binary search algorithm to halve the array ?
A. | middle Sub = (start Sub + stop Sub)/2; |
B. | middle Sub = start Sub + stop Sub/2; |
C. | middle Sub = middle Sub/2; |
D. | middle Sub = (stop Sub - start Sub)/2; |
Answer : A Explanation : Mahesh said: (12:28pm on Tuesday 20th November 2012)
middle Sub = (start Sub stop Sub)/2;
|
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |