From cbfb0480d9b1eb4a50a10fb8fa0766975b63dda3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 15:10:07 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sorts/reverse_selection_sort.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sorts/reverse_selection_sort.py b/sorts/reverse_selection_sort.py index aeb5cf7cf..b87ab0bc5 100644 --- a/sorts/reverse_selection_sort.py +++ b/sorts/reverse_selection_sort.py @@ -16,6 +16,7 @@ Examples: [98, 34, -1, -2, -42] """ + def reverse_selection_sort(collection: list) -> list: """ A pure implementation of reverse selection sort algorithm in Python. @@ -32,7 +33,7 @@ def reverse_selection_sort(collection: list) -> list: max_idx = j # Reverse the subarray from the current position to the end - collection[i:max_idx+1] = reversed(collection[i:max_idx+1]) + collection[i : max_idx + 1] = reversed(collection[i : max_idx + 1]) return collection