
I need HELP doing a binary search
Quote:
> On Fri, 3 Oct 1997 13:42:29 -0700, "Joe Clark"
> > Just curious, if the array is already in order, why do you need a binary
> >search routine. Also, since your array is so small, why not the brute force
> >sequential search & compare method?
> <snip>
> Looks like he just wants help with his homework, Joe.
Ohh, no! It was in part all the "do my homework" posts that drove
been a few years, and we have better filtering technologies now.
:-)
Anyway, I mainly wanted to point out that a binary search *requires*
that the data already be sorted, since it's an algorithm for looking
up data quickly, rather than a sorting method. For a small array,
however, a sequential search may indeed be just as efficient.
[snip]
--
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!