From 1aac36937e4bd99e42240c2c46559b345287f35c Mon Sep 17 00:00:00 2001 From: Silicon27 <99114143+Silicon27@users.noreply.github.com> Date: Sun, 13 Oct 2024 12:50:37 +0200 Subject: [PATCH] Update quantum_bogo_sort.py line too long error resolved --- sorts/quantum_bogo_sort.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sorts/quantum_bogo_sort.py b/sorts/quantum_bogo_sort.py index 1b2e7dec7..08cf24e36 100644 --- a/sorts/quantum_bogo_sort.py +++ b/sorts/quantum_bogo_sort.py @@ -1,30 +1,30 @@ 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. + 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. - Reference: + More info: 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. + :return: list[int] - The sorted list, humorously assumed to be + instantly sorted using quantum superposition. Example: >>> quantum_bogo_sort([2, 1, 4, 3]) [1, 2, 3, 4] - + >>> quantum_bogo_sort([10, -1, 0]) [-1, 0, 10] - + >>> quantum_bogo_sort([5]) [5] - + >>> 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__":