


'''simple docstring'''

from __future__ import annotations






def __UpperCamelCase (      __lowerCamelCase		:			list[int]   ,	__lowerCamelCase		:			int					)   ->  int:







     '''simple docstring'''






     _a      ,      _a            =		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 __UpperCamelCase (      __lowerCamelCase		:			int					)   ->  int:







     '''simple docstring'''






     if not isinstance(__lowerCamelCase   ,	__lowerCamelCase					) or number < 0:
          raise ValueError("Input must be a non-negative integer"					)

     _a            =		number & ~(number - 1)
     _a            =		0
     while intermediate:
          intermediate >>= 1
          index += 1
     return index - 1


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)

