The binary search algorithm in the text makes recursive calls on subarrays of the array passed to the algorithm. The range passed to the search function is first to last. The search algorithm makes recursive calls on the left or right subarray that target will be in, if the target is present. What are the left and right ends of the right subarray?

a) Last , mid – 1
b) last , mid + 1
c) mid – 1, last
d) mid + 1, last
e) last, mid


d) mid + 1, last

Computer Science & Information Technology

You might also like to view...

What is the purpose of the function call?

A. Control is passed to the called function. B. The program is passed all of the called function’s variables. C. main() gets to use the function’s variables. D. Both A & C.

Computer Science & Information Technology

Tracks are different from songs as they are merely information about an album's songs

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following is not a form view?

A. Form view B. Design view C. Layout view D. SQL view

Computer Science & Information Technology

The fourth layer of the OSI model is called the __________ layer.

a. network b. transport c. session d. data link e. presentation

Computer Science & Information Technology