I need HELP doing a binary search 
Author Message
 I need HELP doing a binary search

 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?

I may be misunderstanding the question - are you wondering about using a
binary tree to store this array and use that for searching? If so, and your
array is in order already, that may not be the best way of doing a search.

Joe Clark


Quote:
>I need HELP doing a binary search on an array.  The array is a list of 20
> animals and they will be in alpha order.  CountersA is the name of array
and
> CountersA(1)
>is cat, etc.



Tue, 21 Mar 2000 03:00:00 GMT  
 I need HELP doing a binary search

I need HELP doing a binary search on an array.  The array is a list of 20
 animals and they will be in alpha order.  CountersA is the name of array and
 CountersA(1)
is cat, etc.



Tue, 21 Mar 2000 03:00:00 GMT  
 I need HELP doing a binary search

On Fri, 3 Oct 1997 13:42:29 -0700, "Joe Clark"

Quote:

> 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.

--
Paul Marshall



Wed, 22 Mar 2000 03:00:00 GMT  
 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!



Wed, 22 Mar 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. HELP! Doing Search On Database

2. Help!Doing a Search on Database?

3. Help!-Recrsive Binary Search Algorithm

4. Binary Search Help Please

5. Help: binary search

6. Help! Help needed on searching database

7. NEED HELP WITH A SEARCH FUNCTION IN VB, PLEASE HELP

8. Need help doing a Subtotal through Excel automation in vb.net

9. Binary Files in BASICA - Can It be done?

10. Binary files - what am I doing wrong?

11. Need help with commonon dialog not doing doevents

12. Need help on how to scroll a picture box control (if it can be done)

 

 
Powered by phpBB® Forum Software