Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update radix_sort.py
  • Loading branch information
cclauss authored Oct 1, 2022
commit bcd5572550f5f9b952a29e40392ea19fda07e51e
10 changes: 2 additions & 8 deletions sorts/radix_sort.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
"""
This is a pure Python implementation of the radix sort algorithm
For doctests run following command:
python -m doctest -v radix_sort.py
or
python3 -m doctest -v radix_sort.py
For manual testing run:
python radix_sort.py

Source: https://en.wikipedia.org/wiki/Radix_sort
"""
from __future__ import annotations

Expand All @@ -23,8 +19,6 @@ def radix_sort(list_of_ints: list[int]) -> list[int]:
>>> radix_sort([1,100,10,1000]) == sorted([1,100,10,1000])
True
"""
# Source: https://en.wikipedia.org/wiki/Radix_sort

RADIX = 10
placement = 1
max_digit = max(list_of_ints)
Expand Down