Skip to content

Commit f4a80fb

Browse files
committed
comb_sort: fix typo and indentation
1 parent 5fb6b31 commit f4a80fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sorts/comb_sort.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Comb sort is a relatively simple sorting algorithm originally designed by Wlodzimierz Dobosiewicz in 1980.
33
Later it was rediscovered by Stephen Lacey and Richard Box in 1991. Comb sort improves on bubble sort.
44
5-
This is pure python implementation of counting sort algorithm
5+
This is pure python implementation of comb sort algorithm
66
For doctests run following command:
77
python -m doctest -v comb_sort.py
88
or
@@ -31,15 +31,15 @@ def comb_sort(data):
3131
i = 0
3232

3333
while gap > 1 or swapped:
34-
# Update the gap value for a next comb
34+
# Update the gap value for a next comb
3535
gap = int(float(gap) / shrink_factor)
3636

3737
swapped = False
3838
i = 0
3939

4040
while gap + i < len(data):
4141
if data[i] > data[i+gap]:
42-
# Swap values
42+
# Swap values
4343
data[i], data[i+gap] = data[i+gap], data[i]
4444
swapped = True
4545
i += 1

0 commit comments

Comments
 (0)