





from __future__ import annotations
def  __UpperCamelCase    (						snake_case							,			snake_case      )    ->		Optional[int]:


   '''simple docstring'''







   __A    =  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(1_0_0)), 4_0))






"""simple docstring"""
def   A_    (     _lowercase,   _lowercase,   _lowercase,   _lowercase      ):







						'''simple docstring'''


						snake_case_					:Dict		=     int((lower_bound + upper_bound) // 2      )
						if array[r] == value:
												return r
						if lower_bound >= upper_bound:
												return -1
						if array[r] < value:
												return binary_search(_lowercase,   r + 1,   _lowercase,   _lowercase      )
						else:
												return binary_search(_lowercase,   _lowercase,   r - 1,   _lowercase      )
def   A_    (     _lowercase,   _lowercase      ):







						'''simple docstring'''


						snake_case_					:Any		=     0
						if matrix[index][0] == value:
												return [index, 0]
						while index < len(_lowercase      ) and matrix[index][0] < value:
												snake_case_					:List[str]		=     binary_search(matrix[index],   0,   len(matrix[index]      ) - 1,   _lowercase      )
												if r != -1:
																		return [index, r]
												index += 1
						return [-1, -1]


if __name__ == "__main__":
						import doctest

						doctest.testmod()
