Skip to content

Commit 3a5ca66

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

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sorts/bucket_sort.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def bucket_sort(my_list: list, bucket_count: int = 10) -> list:
8686
bucket_size = (max_value - min_value) / bucket_count
8787
buckets: list[list] = [[] for _ in range(bucket_count)]
8888
for val in my_list:
89-
index = min(int((val - min_value) / bucket_size), bucket_count - 1)
90-
buckets[index].append(val)
89+
index = min(int((val - min_value) / bucket_size), bucket_count - 1)
90+
buckets[index].append(val)
9191
return [val for bucket in buckets for val in sorted(bucket)]
9292

9393

0 commit comments

Comments
 (0)