
from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

__lowerCAmelCase     :	int       			=  typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
__lowerCAmelCase     :	List[Any]       			=  typing.Union[np.floataa, int, float]  # noqa: UP007

def a__       (			A_,	A_   ):






  '''simple docstring'''





  return np.sqrt(np.sum((np.asarray(A_   ) - np.asarray(A_   )) ** 2   )   )

def a__       (			A_,	A_   ):






  '''simple docstring'''





  return sum((va - va) ** 2 for va, va in zip(A_,	A_   )   ) ** (1 / 2)


if __name__ == "__main__":

    def a__       (			):






      '''simple docstring'''





      from timeit import timeit

      print("""Without Numpy"""   )
      print(
          timeit(
              """euclidean_distance_no_np([1, 2, 3], [4, 5, 6])""",	number=10000,	globals=globals(),	)   )
      print("""With Numpy"""   )
      print(
          timeit(
              """euclidean_distance([1, 2, 3], [4, 5, 6])""",	number=10000,	globals=globals(),	)   )





    benchmark()



from __future__ import annotations

def a__       (			A_,	A_,	A_,	A_   ):






  '''simple docstring'''





  if (direction == 1 and array[indexa] > array[indexa]) or (
      direction == 0 and array[indexa] < array[indexa]
  ):
    __magic_name__	,       __magic_name__								=			array[indexa], array[indexa]

def a__       (			A_,	A_,	A_,	A_   ):






  '''simple docstring'''





  if length > 1:
    __magic_name__								=			int(length / 2   )
    for i in range(A_,	low + middle   ):
      comp_and_swap(A_,	A_,	i + middle,	A_   )
    bitonic_merge(A_,	A_,	A_,	A_   )
    bitonic_merge(A_,	low + middle,	A_,	A_   )

def a__       (			A_,	A_,	A_,	A_   ):






  '''simple docstring'''





  if length > 1:
    __magic_name__								=			int(length / 2   )
    bitonic_sort(A_,	A_,	A_,	1   )
    bitonic_sort(A_,	low + middle,	A_,	0   )
    bitonic_merge(A_,	A_,	A_,	A_   )


if __name__ == "__main__":
    __lowerCAmelCase     :	Optional[Any]       			=  input('Enter numbers separated by a comma:\n').strip()
    __lowerCAmelCase     :	List[Any]       			=  [int(item.strip()) for item in user_input.split(',')]

    bitonic_sort(unsorted, 0, len(unsorted), 1)
    print('\nSorted array in ascending order is: ', end='')
    print(*unsorted, sep=', ')

    bitonic_merge(unsorted, 0, len(unsorted), 0)
    print('Sorted array in descending order is: ', end='')
    print(*unsorted, sep=', ')

