If the current distance is less then len update len and set ' start ' and 'end
' NEW_LINE INDENT if ( distance < length ) : NEW_LINE INDENT length = distance NEW_LINE start = vis [ t ] NEW_LINE end = i NEW_LINE DEDENT flag = 1 NEW_LINE DEDENT