sorts.radix_sort

This is a pure Python implementation of the radix sort algorithm

Source: https://en.wikipedia.org/wiki/Radix_sort

Attributes

RADIX

Functions

radix_sort(→ list[int])

Examples:

Module Contents

sorts.radix_sort.radix_sort(list_of_ints: list[int]) list[int]

Examples: >>> radix_sort([0, 5, 3, 2, 2]) [0, 2, 2, 3, 5]

>>> radix_sort(list(range(15))) == sorted(range(15))
True
>>> radix_sort(list(range(14,-1,-1))) == sorted(range(15))
True
>>> radix_sort([1,100,10,1000]) == sorted([1,100,10,1000])
True
sorts.radix_sort.RADIX = 10