




"""simple docstring"""






def 				UpperCAmelCase		(		snake_case      :       str     ):


					for i in range(len(snake_case     ) - 1   ,							0   ,							-1     ):
										_lowerCAmelCase:Any						=	False

										for j in range(snake_case   ,							0   ,							-1     ):
															if unsorted[j] < unsorted[j - 1]:
																				_lowerCAmelCase				, _lowerCAmelCase:Union[str, Any]						=	unsorted[j - 1], unsorted[j]
																				_lowerCAmelCase:Union[str, Any]						=	True

										for j in range(snake_case     ):
															if unsorted[j] > unsorted[j + 1]:
																				_lowerCAmelCase				, _lowerCAmelCase:Union[str, Any]						=	unsorted[j + 1], unsorted[j]
																				_lowerCAmelCase:int						=	True

										if not swapped:
															break
					return unsorted


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				UpperCamelCase__    =      input('''Enter numbers separated by a comma:\n''').strip()
				UpperCamelCase__    =      [int(item) for item in user_input.split(''',''')]
				print(F"{cocktail_shaker_sort(unsorted) = }")













'''simple docstring'''






import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
A__							:  Optional[int]    ='''.'''


if __name__ == "__main__":
      A__							:  int    =os.path.join(REPO_PATH, '''utils/documentation_tests.txt''')
      A__							:  Optional[int]    =[]
      A__							:  Tuple    =[]
      with open(doctest_file_path) as fp:
            for line in fp:
                  A__							:  Optional[Any]    =line.strip()
                  A__							:  Union[str, Any]    =os.path.join(REPO_PATH, line)
                  if not (os.path.isfile(path) or os.path.isdir(path)):
                        non_existent_paths.append(line)
                  all_paths.append(path)
      if len(non_existent_paths) > 0:
            A__							:  List[Any]    ='''\n'''.join(non_existent_paths)
            raise ValueError(F"""`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}""")
      if all_paths != sorted(all_paths):
            raise ValueError('''Files in `utils/documentation_tests.txt` are not in alphabetical order.''')






