
from __future__ import annotations






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE							):
	lowercase       =    0
	lowercase       =    len(snake_case__							) - 1

	while i < j:
		if nums[i] + nums[j] == target:
			return [i, j]
		elif nums[i] + nums[j] < target:
			lowercase       =    i + 1
		else:
			lowercase       =    j - 1

	return []


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	print(F"""{two_pointer([2, 7, 11, 15], 9) = }""")







"""simple docstring"""


from __future__ import annotations


def 					UpperCAmelCase__       (snake_case__							:					list[int]		,   snake_case__							:					int    ):
  """simple docstring"""

  if len(snake_case__    ) < k or k < 0:
    raise ValueError("""Invalid Input"""    )
  _snake_case							:		Optional[int]								=  sum(array[:k]    )
  for i in range(len(snake_case__    ) - k    ):
    _snake_case							:		Optional[Any]								=  current_sum - array[i] + array[i + k]
    _snake_case							:		List[str]								=  max(snake_case__		,   snake_case__    )
  return max_sum


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

     testmod()
     A_						=				[randint(-10_00, 10_00) for i in range(1_00)]
     A_						=				randint(0, 1_10)
     print(F'''The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}''')


