Idea aha 

Forum: Com Sci 221, U Chicago, Autumn 2001, Old Classwork
Re: News Assignment #4 due Monday, 22 October (Mike O'Donnell)
Re: Question Questions about presentation (Roni Choudhury)
Re: Note One more question (Roni Choudhury)
Date: 2001, Oct 20
From: Roni Choudhury roni

Ah, so we just report the value of B and think no more on it. The idea is that a programmer using this function might do the following:

/* begin code */
B = binsearch(A, 1, size_of_A - 1);
if (B!=0 && 5==A[B])
     printf("5 is in the array\n");
else
     printf("5 is not in the array\n");
/* end code */

Is that the right idea?

roni


Messages

1. Agree Merely compute B by Mike O'Donnell, 2001, Oct 20

to: "aha"