We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98be4bb commit d88f630Copy full SHA for d88f630
sorting/radix_sort.py
@@ -1,11 +1,11 @@
1
-""" An implementation of the linear running-time sorting algorithm radix-sort. """
+""" An implementation of the O(n) sorting algorithm (lsd) radix-sort. """
2
__author__ = 'Claus Martinsen'
3
4
5
def radix_sort(lst, digits):
6
"""
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
+ Sorts a list of decimal integers in linear running-time by sorting by each
+ digit, from least significant to most significant. The upper bound is given as
9
10^(digits) - 1, and all numbers has to be less than this for the algorithm
10
to be correct.
11
0 commit comments