Skip to content

Commit 22e5570

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent af84c75 commit 22e5570

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sorts/reversort.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def reversort(collection: list[Any]) -> list[Any]:
9191

9292
# Reverse the subarray from position i to min_index
9393
if min_index != i:
94-
arr[i:min_index + 1] = arr[i:min_index + 1][::-1]
94+
arr[i : min_index + 1] = arr[i : min_index + 1][::-1]
9595

9696
return arr
9797

@@ -132,7 +132,7 @@ def reversort_cost(collection: list[Any]) -> int:
132132
min_index = j
133133

134134
# Reverse the subarray from position i to min_index
135-
arr[i:min_index + 1] = arr[i:min_index + 1][::-1]
135+
arr[i : min_index + 1] = arr[i : min_index + 1][::-1]
136136

137137
# Cost is the length of the reversed segment
138138
total_cost += min_index - i + 1

0 commit comments

Comments
 (0)