
"""simple docstring"""




from __future__ import annotations

from random import choice



def        _lowerCamelCase ( __a    ):
		return choice(__a    )



def        _lowerCamelCase ( __a,							__a    ):
		SCREAMING_SNAKE_CASE_						 = random_pivot(__a    )

		# partition based on pivot
		# linear time
		SCREAMING_SNAKE_CASE_						 = [e for e in lst if e < pivot]
		SCREAMING_SNAKE_CASE_						 = [e for e in lst if e > pivot]

		# if we get lucky, pivot might be the element we want.
		# we can easily see this:
		# small (elements smaller than k)
		# + pivot (kth element)
		# + big (elements larger than k)
		if len(__a    ) == k - 1:
				return pivot
		# pivot is in elements bigger than k
		elif len(__a    ) < k - 1:
				return kth_number(__a,							k - len(__a    ) - 1    )
		# pivot is in elements smaller than k
		else:
				return kth_number(__a,							__a    )


if __name__ == "__main__":
						import doctest

						doctest.testmod()

"""simple docstring"""




from __future__ import annotations



def        _lowerCamelCase ( __a,							__a    ):
		SCREAMING_SNAKE_CASE_						 = 0
		SCREAMING_SNAKE_CASE_						 = len(__a    ) - 1

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

		return []


if __name__ == "__main__":
						import doctest

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