This commit is contained in:
Ingy döt Net 2013-10-27 22:24:23 +00:00
parent 6f050a029e
commit 776bba907c
3887 changed files with 59894 additions and 7280 deletions

View file

@ -40,7 +40,7 @@ def split_by_sign(a_list):
def radixSort(a_list, base):
# there are as many passes as there are digits in the longest number
passes = int(log(maxAbs(a_list), base) + 1)
passes = int(round(log(maxAbs(a_list), base)) + 1)
new_list = list(a_list)
for digit_num in range(passes):
new_list = merge(split(new_list, base, digit_num))