


"""simple docstring"""







def 					a__			(				SCREAMING_SNAKE_CASE    :    list				):


  '''simple docstring'''







  if len(SCREAMING_SNAKE_CASE				) < 2:
    return collection

  def circle_sort_util(SCREAMING_SNAKE_CASE    :    list				,      SCREAMING_SNAKE_CASE    :    int				,      SCREAMING_SNAKE_CASE    :    int				) -> bool:
    lowerCAmelCase     :     List[str]								=							False

    if low == high:
      return swapped

    lowerCAmelCase     :     List[str]								=							low
    lowerCAmelCase     :     Dict								=							high

    while left < right:
      if collection[left] > collection[right]:
        lowerCAmelCase						,  lowerCAmelCase     :     int								=							(
            collection[right],
            collection[left],
        )
        lowerCAmelCase     :     Tuple								=							True

      left += 1
      right -= 1

    if left == right and collection[left] > collection[right + 1]:
      lowerCAmelCase						,  lowerCAmelCase     :     int								=							(
          collection[right + 1],
          collection[left],
      )

      lowerCAmelCase     :     Optional[int]								=							True

    lowerCAmelCase     :     List[Any]								=							low + int((high - low) / 2				)
    lowerCAmelCase     :     Union[str, Any]								=							circle_sort_util(SCREAMING_SNAKE_CASE				,      SCREAMING_SNAKE_CASE				,      SCREAMING_SNAKE_CASE				)
    lowerCAmelCase     :     Dict								=							circle_sort_util(SCREAMING_SNAKE_CASE				,      mid + 1				,      SCREAMING_SNAKE_CASE				)

    return swapped or left_swap or right_swap

  lowerCAmelCase     :     Dict								=							True

  while is_not_sorted is True:
    lowerCAmelCase     :     List[Any]								=							circle_sort_util(SCREAMING_SNAKE_CASE				,      0				,      len(SCREAMING_SNAKE_CASE				) - 1				)

  return collection


if __name__ == "__main__":
     lowerCAmelCase__      				=   input('''Enter numbers separated by a comma:\n''').strip()
     lowerCAmelCase__      				=   [int(item) for item in user_input.split(''',''')]
     print(circle_sort(unsorted))









'''simple docstring'''







from __future__ import annotations

import requests


def 	SCREAMING_SNAKE_CASE_					(  _UpperCAmelCase	:	str  )  ->			dict:
       _a    : Any     					=F"https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty"
       return requests.get(_UpperCAmelCase  ).json()


def 	SCREAMING_SNAKE_CASE_					(  _UpperCAmelCase	:	int = 10  )  ->			list[dict]:
       _a    : Union[str, Any]     					="""https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"""
       _a    : int     					=requests.get(_UpperCAmelCase  ).json()[:max_stories]
       return [get_hackernews_story(_UpperCAmelCase  ) for story_id in story_ids]


def 	SCREAMING_SNAKE_CASE_					(  _UpperCAmelCase	:	int = 10  )  ->			str:
       _a    : Union[str, Any]     					=hackernews_top_stories(_UpperCAmelCase  )
       return "\n".join("""* [{title}]({url})""".format(**_UpperCAmelCase  ) for story in stories  )


if __name__ == "__main__":
   print(hackernews_top_stories_as_markdown())


