Skip to content

Commit 5f12ba1

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

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

sorts/cyclic_sort.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ def cyclic_sort(nums: list[int]) -> list[int]:
5757
# Check if all numbers are in range 1 to n
5858
for num in nums:
5959
if num < 1 or num > n:
60-
raise ValueError(
61-
f"All numbers must be in range 1 to {n}, got {num}"
62-
)
60+
raise ValueError(f"All numbers must be in range 1 to {n}, got {num}")
6361

6462
# Perform cyclic sort
6563
index = 0

0 commit comments

Comments
 (0)