diff --git a/sorts/quantum_bogo_sort.py b/sorts/quantum_bogo_sort.py index 7bc8f8e4d..d493bf76b 100644 --- a/sorts/quantum_bogo_sort.py +++ b/sorts/quantum_bogo_sort.py @@ -1,7 +1,4 @@ -from typing import List - - -def quantum_bogo_sort(arr: List[int]) -> List[int]: +def quantum_bogo_sort(arr: list[int]) -> list[int]: """ Quantum Bogo Sort is a theoretical sorting algorithm that uses quantum mechanics to sort the elements. It is not practically feasible and is included here for humor. @@ -9,8 +6,8 @@ def quantum_bogo_sort(arr: List[int]) -> List[int]: Reference: https://en.wikipedia.org/wiki/Bogosort#:~:text=achieve%20massive%20complexity.-,Quantum%20bogosort,-A%20hypothetical%20sorting - :param arr: List[int] - The list of numbers to sort. - :return: List[int] - The sorted list, humorously assumed to be instantly sorted using quantum superposition. + :param arr: list[int] - The list of numbers to sort. + :return: list[int] - The sorted list, humorously assumed to be instantly sorted using quantum superposition. Example: >>> quantum_bogo_sort([2, 1, 4, 3]) @@ -25,11 +22,9 @@ def quantum_bogo_sort(arr: List[int]) -> List[int]: >>> quantum_bogo_sort([]) [] """ - return sorted( - arr - ) # Sorting is assumed to be done instantly via quantum superposition + return sorted(arr) # Sorting is assumed to be done instantly via quantum superposition if __name__ == "__main__": - my_array: List[int] = [2, 1, 4, 3] + my_array: list[int] = [2, 1, 4, 3] print(quantum_bogo_sort(my_array))