






import operator

def      lowerCAmelCase__	(    _a       :			list  ,      _a       :			bool = False  ,      _a       :			list | None = None    ):
		snake_case_				:							Any						 =       operator.lt if reverse else operator.gt
		snake_case_				:							Optional[Any]						 =       solution or []

		if not arr:
				return solution

		snake_case_				:							Tuple						 =       [arr.pop(0    )]
		for i, item in enumerate(_a    ):
				if _operator(_a  ,      sublist[-1]    ):
						sublist.append(_a    )
						arr.pop(_a    )

    #  merging sublist into solution list
		if not solution:
				solution.extend(_a    )
		else:
				while sublist:
						snake_case_				:							Dict						 =       sublist.pop(0    )
						for i, xx in enumerate(_a    ):
								if not _operator(_a  ,      _a    ):
										solution.insert(_a  ,      _a    )
										break
						else:
								solution.append(_a    )

		strand_sort(_a  ,      _a  ,      _a    )
		return solution


if __name__ == "__main__":
							assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
							assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]








import math

def      lowerCAmelCase__	(    _a       :			int    ):

		if 1 < number < 4:
				# 2 and 3 are primes
				return True
		elif number < 2 or number % 2 == 0 or number % 3 == 0:
				# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
				return False

		# All primes number are in format of 6k +/- 1
		for i in range(5  ,      int(math.sqrt(_a    ) + 1    )  ,      6    ):
				if number % i == 0 or number % (i + 2) == 0:
						return False
		return True

def      lowerCAmelCase__	(    _a       :			float = 0.1    ):
		snake_case_				:							int						 =       3
		snake_case_				:							Optional[Any]						 =       3

		while primes / (2 * j - 1) >= ratio:
				for i in range(j * j + j + 1  ,      (j + 2) * (j + 2)  ,      j + 1    ):
						primes += is_prime(_a    )
				j += 2
		return j


if __name__ == "__main__":
							import doctest

							doctest.testmod()
