From c1994c06e986ff52060c5b1e1d16379741216c17 Mon Sep 17 00:00:00 2001 From: Sharan Sukesh <77352136+sharansukesh1003@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:43:51 +0530 Subject: [PATCH] Update cyclic_sort.py --- sorts/cyclic_sort.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/sorts/cyclic_sort.py b/sorts/cyclic_sort.py index afc59b1a2..2deebc42a 100644 --- a/sorts/cyclic_sort.py +++ b/sorts/cyclic_sort.py @@ -24,8 +24,6 @@ def cyclic_sort(nums: list) -> list: [1, 2, 3, 4, 5] >>> cyclic_sort([]) [] - >>> cyclic_sort([-2, -5, -45]) - [-45, -5, -2] """ # Perform cyclic sort @@ -33,7 +31,6 @@ def cyclic_sort(nums: list) -> list: while i < len(nums): # Calculate the correct index for the current element correct_index = nums[i] - 1 - # If the current element is not at its correct position, # swap it with the element at its correct index if nums[i] != nums[correct_index]: