Checks each element one by one until the target is found or the list ends.
Efficiently finds the target by repeatedly dividing a sorted list in half.