Skip to content

Commit d88f630

Browse files
authored
Clearified that it is a lsd-radix sort
1 parent 98be4bb commit d88f630

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sorting/radix_sort.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
""" An implementation of the linear running-time sorting algorithm radix-sort. """
1+
""" An implementation of the O(n) sorting algorithm (lsd) radix-sort. """
22
__author__ = 'Claus Martinsen'
33

44

55
def radix_sort(lst, digits):
66
"""
7-
Sorts a list of decimal integers in linear running-time by exploiting the
8-
fact that we know their upper bound. The upper bound is given as
7+
Sorts a list of decimal integers in linear running-time by sorting by each
8+
digit, from least significant to most significant. The upper bound is given as
99
10^(digits) - 1, and all numbers has to be less than this for the algorithm
1010
to be correct.
1111

0 commit comments

Comments
 (0)