Skip to content

Commit 2974720

Browse files
committed
review
1 parent cbac920 commit 2974720

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sorts/comb_sort.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This is pure python implementation of comb sort algorithm.
2+
This is pure Python implementation of comb sort algorithm.
33
Comb sort is a relatively simple sorting algorithm originally designed by Wlodzimierz Dobosiewicz in 1980.
44
It was rediscovered by Stephen Lacey and Richard Box in 1991. Comb sort improves on bubble sort algorithm.
55
In bubble sort, distance (or gap) between two compared elements is always one.
@@ -37,7 +37,7 @@ def comb_sort(data: list) -> list:
3737
while not completed:
3838

3939
# Update the gap value for a next comb
40-
gap = int(gap / shrink_factor)
40+
gap //= shrink_factor
4141
if gap <= 1:
4242
completed = True
4343

0 commit comments

Comments
 (0)