
"""simple docstring"""




from __future__ import annotations

def     UpperCamelCase_    (						SCREAMING_SNAKE_CASE_     ):
					SCREAMING_SNAKE_CASE           =      sorted(_UpperCAmelCase     )
					SCREAMING_SNAKE_CASE           =      len(_UpperCAmelCase     )
					SCREAMING_SNAKE_CASE           =      length >> 1
					return (
					    (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
					    if length % 2 == 0
					    else sorted_list[mid_index]
					)

def     UpperCamelCase_    (						):
					import doctest

					doctest.testmod()


if __name__ == "__main__":
	main()







'''simple docstring'''


from __future__ import annotations




def       A							(      _UpperCAmelCase   :				list[int]						,_UpperCAmelCase   :				int					)  ->				int:


  '''simple docstring'''




  __lowerCAmelCase     ,					__lowerCAmelCase		:    Dict			     =  0, len(_UpperCAmelCase					) - 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_00)), 40))





