Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's the challenge (1st post edited)
#14
Binary search performs a search in a sorted set of objects. It does it taking the object in the middle and comparing it to the searched one. If it is less, you know you have to search in the right half ('cause the set is ordered). If it is greater, you have to search in the left half. So you select whether the left or right half and repeat.

That guarantees that you'll find your object in less than log N tries (log in base 2), which means that, for example, in a set of 256 objects you'll find anything in 8 tries or less.

btw... they way I was thinking about 1st gets the parser working and then you can multitask whatever you want, it's only a matter of shifting which file you are using and performing some protection in variables (visibility)... Thats brings the impossed limit of 255 files as it is the max # of files QB can keep open in theory.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Messages In This Thread
Here's the challenge (1st post edited) - by Z!re - 07-08-2004, 03:46 PM
Here's the challenge (1st post edited) - by jatos - 07-08-2004, 03:56 PM
Hy - by QbGuru - 07-09-2004, 07:35 PM
Here's the challenge (1st post edited) - by na_th_an - 07-10-2004, 01:53 AM
Here's the challenge (1st post edited) - by jatos - 07-12-2004, 06:07 PM
Here's the challenge (1st post edited) - by jatos - 07-15-2004, 07:51 PM
Here's the challenge (1st post edited) - by jatos - 08-11-2004, 10:32 PM
Here's the challenge (1st post edited) - by jatos - 08-12-2004, 03:39 PM
Here's the challenge (1st post edited) - by jatos - 08-12-2004, 09:10 PM
Here's the challenge (1st post edited) - by Z!re - 08-13-2004, 02:37 AM
Here's the challenge (1st post edited) - by jatos - 08-26-2004, 07:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)