




from __future__ import annotations






def    UpperCAmelCase__	(						lowerCamelCase  : Tuple ,lowerCamelCase  : Optional[Any]						):
   lowerCamelCase							,					lowerCamelCase											=0, len(lowercase__						) - 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))







import math
from decimal import Decimal, getcontext






def    UpperCAmelCase__	(						lowerCamelCase  : int = 4_00_00_00						):

   try:
      lowerCamelCase											=int(lowerCamelCase						)
   except (TypeError, ValueError):
      raise TypeError("""Parameter n must be int or castable to int."""						)
   if n <= 0:
      raise ValueError("""Parameter n must be greater than or equal to one."""						)
   lowerCamelCase											=1_00
   lowerCamelCase											=(Decimal(5						) ** Decimal(0.5						) + 1) / Decimal(2						)

   lowerCamelCase											=(math.floor(math.log(n * (phi + 2) ,lowerCamelCase						) - 1						) // 3) * 3 + 2
   lowerCamelCase											=Decimal(round(phi ** Decimal(index + 1						)						)						) / (phi + 2)
   lowerCamelCase											=num // 2
   return int(lowerCamelCase						)


if __name__ == "__main__":
   print(f"{solution() = }")