






"""simple docstring"""





from __future__ import annotations

from collections.abc import Iterator
from typing import Any






class 					a						:






    def __init__(	self					:							Union[str, Any]	,						__SCREAMING_SNAKE_CASE					:							Optional[int] )					->		int:
      lowerCamelCase_   					=						data
      lowerCamelCase_   					=						None






    def __str__(	self					:							Any )					->		Any:
      return F'''{self.data}'''






class 					a						:






    def __init__(	self					:							str )					->		Dict:
      lowerCamelCase_   					=						None
      lowerCamelCase_   					=						None






    def __iter__(	self					:							List[str] )					->		Dict:
      lowerCamelCase_   					=						self.front
      while node:
        yield node.data
        lowerCamelCase_   					=						node.next






    def __len__(	self					:							Optional[Any] )					->		Any:
      return len(tuple(iter(self ) ) )






    def __str__(	self					:							int )					->		int:
      return " <- ".join(str(lowercase__ ) for item in self )






    def        UpperCamelCase	(	self					:							Optional[Any] )					->		int:
      return len(self ) == 0






    def        UpperCamelCase	(	self					:							str	,						__SCREAMING_SNAKE_CASE					:							Optional[Any] )					->		Union[str, Any]:
      lowerCamelCase_   					=						Node(lowercase__ )
      if self.is_empty():
        lowerCamelCase_   					=						node
      else:
        assert isinstance(self.rear	,						lowercase__ )
        lowerCamelCase_   					=						node
        lowerCamelCase_   					=						node






    def        UpperCamelCase	(	self					:							Optional[int] )					->		Dict:






      if self.is_empty():
        raise IndexError('dequeue from empty queue' )
      assert isinstance(self.front	,						lowercase__ )
      lowerCamelCase_   					=						self.front
      lowerCamelCase_   					=						self.front.next
      if self.front is None:
        lowerCamelCase_   					=						None
      return node.data






    def        UpperCamelCase	(	self					:							Any )					->		List[Any]:
      lowerCamelCase_   					=						None


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

  testmod()












"""simple docstring"""





from __future__ import annotations







def 					lowerCamelCase__	(							_lowerCamelCase	:		list[int]		,    _lowerCamelCase	:		int			)				->    int:
  lowerCamelCase_					,     lowerCamelCase_   					=						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))




