[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-10-12 15:10:07 +00:00
parent 177954960c
commit cbfb0480d9

View File

@ -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