Binary search variant, has anyone done this? 
Author Message
 Binary search variant, has anyone done this?

I'm applying the binary search routine in K&R, p54 my version to
manage alarms in a process plant. The version in the book returns the
position in the array if the element is present, and -1 if it's not. I
need to modify the function to tell main() where to put the element if
it isn't already present, so a separate addval function can add it to
the array.

What seemed like a 5 minute task is proving to be not so. None of my
algo books cover this situation. Does anyone have pseudocode or code /
prepared to share it?  



Thu, 02 May 2002 03:00:00 GMT  
 Binary search variant, has anyone done this?
Problem has been solved. Happy to send result to anyone with a use.


Thu, 02 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Binary search variant, has anyone done this?

2. Binary Search and Sequential Search

3. how can search binary code in binary file?

4. Doing something and still having the GUI go

5. Is anyone else having this problem with VC6?

6. Anyone having SQL 7 problems w/VC++ ?

7. Anyone else having problems with Outlook Express and Microsoft groups

8. Anyone having problems with wnaspi32.dll???

9. having problem with this code for hex/binary conversion

10. Crystal Reports - in VC (anyone done it?) reporting

11. Anyone done any TAPI programming?

12. Anyone done the hot tracking menus?

 

 
Powered by phpBB® Forum Software