Binary search of an array in alpha order call it arr$()
Mark the first item low = 1 mark the last item high = number of items
recalcMiddle:
if low > high then the item is not found in arr$() and you are done with unsuccessful search.
then middle = int(low + high)/2
now if the arr$(middle) > search item then move high to middle - 1 goto recalcMiddle
now if arr$(middle) < search item then low = middle + 1 goto recalcMiddle
now if arr$(middle) = search item then you've found it and are done!
You play the game, guess my number from 1 to 100, in just the same way!
Mark the first item low = 1 mark the last item high = number of items
recalcMiddle:
if low > high then the item is not found in arr$() and you are done with unsuccessful search.
then middle = int(low + high)/2
now if the arr$(middle) > search item then move high to middle - 1 goto recalcMiddle
now if arr$(middle) < search item then low = middle + 1 goto recalcMiddle
now if arr$(middle) = search item then you've found it and are done!
You play the game, guess my number from 1 to 100, in just the same way!
b = b + ...