


"""simple docstring"""






from __future__ import annotations


def __lowercase  (   lowerCamelCase_	:   list[int]    ,       lowerCamelCase_	:   int	):
				SCREAMING_SNAKE_CASE__				,   SCREAMING_SNAKE_CASE__  				=					0, len(lowerCamelCase_	) - 1
				while start_ind <= end_ind:
								if array[start_ind] == search_item:
												return start_ind
								elif array[end_ind] == search_item:
												return end_ind
								else:
												start_ind += 1
												end_ind -= 1
    # returns -1 if search_item is not found in array
				return -1


if __name__ == "__main__":
	print(double_linear_search(list(range(100)), 40))




"""simple docstring"""






def __lowercase  (   lowerCamelCase_	:   str	):
				SCREAMING_SNAKE_CASE__  				=					str(lowerCamelCase_	).strip()
				if not oct_string:
								raise ValueError("Empty string was passed to the function"	)
				SCREAMING_SNAKE_CASE__  				=					oct_string[0] == "-"
				if is_negative:
								SCREAMING_SNAKE_CASE__  				=					oct_string[1:]
				if not oct_string.isdigit() or not all(0 <= int(lowerCamelCase_	) <= 7 for char in oct_string	):
								raise ValueError("Non-octal value was passed to the function"	)
				SCREAMING_SNAKE_CASE__  				=					0
				for char in oct_string:
								SCREAMING_SNAKE_CASE__  				=					8 * decimal_number + int(lowerCamelCase_	)
				if is_negative:
								SCREAMING_SNAKE_CASE__  				=					-decimal_number
				return decimal_number


if __name__ == "__main__":
	from doctest import testmod

	testmod()
