We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbac920 commit 2974720Copy full SHA for 2974720
sorts/comb_sort.py
@@ -1,5 +1,5 @@
1
"""
2
-This is pure python implementation of comb sort algorithm.
+This is pure Python implementation of comb sort algorithm.
3
Comb sort is a relatively simple sorting algorithm originally designed by Wlodzimierz Dobosiewicz in 1980.
4
It was rediscovered by Stephen Lacey and Richard Box in 1991. Comb sort improves on bubble sort algorithm.
5
In bubble sort, distance (or gap) between two compared elements is always one.
@@ -37,7 +37,7 @@ def comb_sort(data: list) -> list:
37
while not completed:
38
39
# Update the gap value for a next comb
40
- gap = int(gap / shrink_factor)
+ gap //= shrink_factor
41
if gap <= 1:
42
completed = True
43
0 commit comments