Yeah, IanM's having a bash too, but sometimes it's tricky to get the concept across with just words. Maybe a search on Google or something for "Binary search algorithm" might through up a lot more detail? Either way, it does seem like the solution you want.
I'll try and explain the concept in another way.
-You have the alphabet stores in an array, and you want to find if the letter "R" exists in that list (we all know it does, but assume we dont). The array is obviously 26 elements long.
-You could do a for loop 1 to 26 and check each element (this is what you're doing, correct?) But we'll use a binary search instead.
Step 1 - Select the middle of the list. If it's 26 items long, the middle is 13, which is the letter "M".
Step 2 - Is this the letter we're looking for? Nope. Is it bigger than the letter we're looking for? Nope. Is it smaller than the letter we're looking for? Yep ... M is smaller than R.
We now know that if R is within the array, it must be in a position greater than 13, so we can ignore all the array positions before 13.
Step 3 - Our new lower search boundary is 14. Our upper search boundary is still 26.
Step 4 - The middle of 26 and 14 is 20. The letter at position 20 is "T"
Step 5 - Is this the letter we're looking for? Nope. Is it bigger than the letter we're looking for? Yes - T is bigger than R. So we know if R exists in the array, it must be between 14 and 19, as all positions bigger than 20 (holding T) are larger than the value R.
Step 6 - Lower search boundary is still 14. Upper search boundary is now 19.
Step 7 - The middle is 16 (rounded down because the exact middle is a .5 number). Which is "P". Repeating all the processes above we then get.
Step 8 - Numbers 17 - 19
Step 9 - Middle = 18 (rounded down) This is "R" .. so it's been found.
If we'd got down to where the upper and lower boundary equalled the same number, with no match, then we end the search knowing the is no match in the array.
If you look at all the "middle number is" parts, that's how many times you've actually accessed the array. In this example it's 4 times. If you search from A->R using a 4 loop, it'd take 18 times. Binary searches come into their own in large searches though.
If you have 1000,000 elements, you might have to for loop through 1000,000 times, but using a binary search, the maximum you'd have to for loop through is 20 times. So it's the daddy of searches.
Hope that makes it more clear, otherwise I'm stumped.
Insiiiiiiiiiiiiiiiiiiiiiiiide!