You’re looking for 18 in an ordered list, and the middle value turns out to be 11. That means every value at or before that position is too small. With a single comparison, you’ve learned where to continue and which part you can safely ignore.
Binary search repeats that decision on whatever search interval remains. Halving the number of candidates each time makes even a large search shrink surprisingly fast:
The bars show how many candidates remain after each decision. If the answer exists, it must still lie within that region. Explain why your comparison lets you discard the other part.
In the walkthroughs for this course, an interval starts at left and stops before right. An empty interval has left == right. You can use another consistent convention in your own solution, but check that every update shrinks the interval. A boundary that never changes can leave your loop spinning forever, which is a very common slip and an easy one to catch once you look for it.