I am implementing a binary search. I seem to have solved my problem but I\'d like to understand what was going on.
Here is what I was originally doing for my search: