From f6b549d5c3e0d1dbcc26e5e688f95917efd5d9eb Mon Sep 17 00:00:00 2001 From: debjit Date: Sat, 1 Oct 2022 16:48:19 +0530 Subject: [PATCH 1/4] fixed wrong algo name to radix sort --- sorts/radix_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/radix_sort.py b/sorts/radix_sort.py index e433bc507a1e..587aea9e45b6 100644 --- a/sorts/radix_sort.py +++ b/sorts/radix_sort.py @@ -1,5 +1,5 @@ """ -This is a pure Python implementation of the quick sort algorithm +This is a pure Python implementation of the radix sort algorithm For doctests run following command: python -m doctest -v radix_sort.py or From 300572d20366fae2f1988b4e82dcd220e4898f78 Mon Sep 17 00:00:00 2001 From: debjit Date: Sat, 1 Oct 2022 16:52:35 +0530 Subject: [PATCH 2/4] added wiki url --- sorts/radix_sort.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sorts/radix_sort.py b/sorts/radix_sort.py index 587aea9e45b6..e6e2c0295524 100644 --- a/sorts/radix_sort.py +++ b/sorts/radix_sort.py @@ -23,6 +23,8 @@ def radix_sort(list_of_ints: list[int]) -> list[int]: >>> radix_sort([1,100,10,1000]) == sorted([1,100,10,1000]) True """ + # https://en.wikipedia.org/wiki/Radix_sort + RADIX = 10 placement = 1 max_digit = max(list_of_ints) From c7292f6141ebb36eea7dfecde7211d01e4972985 Mon Sep 17 00:00:00 2001 From: debjit Date: Sat, 1 Oct 2022 17:37:03 +0530 Subject: [PATCH 3/4] Added "source" in docstring --- sorts/radix_sort.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorts/radix_sort.py b/sorts/radix_sort.py index e6e2c0295524..0651779b4701 100644 --- a/sorts/radix_sort.py +++ b/sorts/radix_sort.py @@ -23,8 +23,8 @@ def radix_sort(list_of_ints: list[int]) -> list[int]: >>> radix_sort([1,100,10,1000]) == sorted([1,100,10,1000]) True """ - # https://en.wikipedia.org/wiki/Radix_sort - + # Source: https://en.wikipedia.org/wiki/Radix_sort + RADIX = 10 placement = 1 max_digit = max(list_of_ints) From bcd5572550f5f9b952a29e40392ea19fda07e51e Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 1 Oct 2022 14:16:47 +0200 Subject: [PATCH 4/4] Update radix_sort.py --- sorts/radix_sort.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sorts/radix_sort.py b/sorts/radix_sort.py index 0651779b4701..c3ff04f3d5e5 100644 --- a/sorts/radix_sort.py +++ b/sorts/radix_sort.py @@ -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 @@ -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)