I don't understand the +5 and -5 logic. When your target string is near the ends of the array, aren't you going to "jump" right off the ends of it with that kind of adjustment?

May I inquire if...