Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to format a While... Wend correctly?
#25
Zebra is in there, and it's an okay definition.  The problem is it doesn't get found in an unsorted binary search.   My guess is that one of the words that is in that chain of searches is spelt wrong, and that's throwing the search off.

say we have a list of 10 things.  A B C D E F H G I J, and we want to find H

Search starts at E...  less than H, so we look half-way higher
G is the mid-point of the remainder... it's less than H, so we look half-way higher
I is the mid-point of what remains...  it's greater than H, so we look half-way lower
but there is no mid-point between G and I!

"Letter not found!"

It's in there, but since it's out of order or typoed or whatever, it throws the binary search method off.

Doing a sort, "zebra" is found and exists once again.  Without sorting, it's not, for whatever odd reason.
Reply


Messages In This Thread
RE: How to format a While... Wend correctly? - by SMcNeill - 02-29-2024, 03:11 PM



Users browsing this thread: 1 Guest(s)