Thurs, 2nd Nov 2017, 15:32 Re: Programming Lab 2

A student writes:

> Dr. Patt,
> I have a few more questions about the program regarding the subroutine.
> In the lab assignment, it says that we will be counted off for calling
> the subroutine too many times, but how many times is too many? Is this
> just to prevent checking every single integer in the range to see if it
> is a zero?
> <<rest of email deleted>>
> <<name withheld to protect the student who is obsessing>>

Yes!  To do that would be to use a linear search, and we want you to use
a binary search.

Suppose the interval is one million.  A binary search will require 20 calls,
while a linear search will require 1,000,000 calls.  If your program would
do fewer than 200 calls, you will not lose any points.

Good luck finishing the program by the deadline.

Yale Patt