



import math






def        A       (      _lowerCamelCase       ,				_lowerCamelCase = 0       ,				_lowerCamelCase = 0						):





							'''simple docstring'''




							_lowerCAmelCase  :							str				     =					end or len(_lowerCamelCase						)
							for i in range(_lowerCamelCase       ,				_lowerCamelCase						):
														_lowerCAmelCase  :							Optional[int]				     =					i
														_lowerCAmelCase  :							int				     =					array[i]
														while temp_index != start and temp_index_value < array[temp_index - 1]:
																					_lowerCAmelCase  :							Union[str, Any]				     =					array[temp_index - 1]
																					temp_index -= 1
														_lowerCAmelCase  :							List[Any]				     =					temp_index_value
							return array






def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):  # Max Heap





							'''simple docstring'''




							_lowerCAmelCase  :							Union[str, Any]				     =					index
							_lowerCAmelCase  :							List[Any]				     =					2 * index + 1  # Left Node
							_lowerCAmelCase  :							Union[str, Any]				     =					2 * index + 2  # Right Node

							if left_index < heap_size and array[largest] < array[left_index]:
														_lowerCAmelCase  :							Tuple				     =					left_index

							if right_index < heap_size and array[largest] < array[right_index]:
														_lowerCAmelCase  :							Any				     =					right_index

							if largest != index:
														_lowerCAmelCase     ,					_lowerCAmelCase  :							Optional[int]				     =					array[largest], array[index]
														heapify(_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						)






def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							_lowerCAmelCase  :							Dict				     =					len(_lowerCamelCase						)

							for i in range(n // 2       ,				-1       ,				-1						):
														heapify(_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						)

							for i in range(n - 1       ,				0       ,				-1						):
														_lowerCAmelCase     ,					_lowerCAmelCase  :							str				     =					array[0], array[i]
														heapify(_lowerCamelCase       ,				0       ,				_lowerCamelCase						)

							return array






def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							if (array[first_index] > array[middle_index]) != (
							    array[first_index] > array[last_index]
							):
														return array[first_index]
							elif (array[middle_index] > array[first_index]) != (
							    array[middle_index] > array[last_index]
							):
														return array[middle_index]
							else:
														return array[last_index]






def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							_lowerCAmelCase  :							str				     =					low
							_lowerCAmelCase  :							Optional[Any]				     =					high
							while True:
														while array[i] < pivot:
																					i += 1
														j -= 1
														while pivot < array[j]:
																					j -= 1
														if i >= j:
																					return i
														_lowerCAmelCase     ,					_lowerCAmelCase  :							Union[str, Any]				     =					array[j], array[i]
														i += 1






def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							if len(_lowerCamelCase						) == 0:
														return array
							_lowerCAmelCase  :							int				     =					2 * math.ceil(math.loga(len(_lowerCamelCase						)						)						)
							_lowerCAmelCase  :							int				     =					16
							return intro_sort(_lowerCamelCase       ,				0       ,				len(_lowerCamelCase						)       ,				_lowerCamelCase       ,				_lowerCamelCase						)






def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							while end - start > size_threshold:
														if max_depth == 0:
																					return heap_sort(_lowerCamelCase						)
														max_depth -= 1
														_lowerCAmelCase  :							Dict				     =					median_of_a(_lowerCamelCase       ,				_lowerCamelCase       ,				start + ((end - start) // 2) + 1       ,				end - 1						)
														_lowerCAmelCase  :							Optional[Any]				     =					partition(_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						)
														intro_sort(_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						)
														_lowerCAmelCase  :							Union[str, Any]				     =					p
							return insertion_sort(_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						)


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						_snake_case	=						input("Enter numbers separated by a comma : ").strip()
						_snake_case	=						[float(item) for item in user_input.split(",")]
						print(sort(unsorted))





import requests
from bsa import BeautifulSoup






def        A       (      _lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							_lowerCAmelCase  :							List[str]				     =					BeautifulSoup(requests.get(_lowerCamelCase       ,				params=_lowerCamelCase						).content       ,				"html.parser"						)
							_lowerCAmelCase  :							Any				     =					soup.find("div"       ,				attrs={"class": "gs_ri"}						)
							_lowerCAmelCase  :							str				     =					div.find("div"       ,				attrs={"class": "gs_fl"}						).find_all("a"						)
							return anchors[2].get_text()


if __name__ == "__main__":
						_snake_case	=						{
						    "title": (
						        "Precisely geometry controlled microsupercapacitors for ultrahigh areal "
						        "capacitance, volumetric capacitance, and energy density"
						    ),
						    "journal": "Chem. Mater.",
						    "volume": 30,
						    "pages": "3979-3990",
						    "year": 2018,
						    "hl": "en",
						}
						print(get_citation("https://scholar.google.com/scholar_lookup", params=params))
