Merge pull request #135 from KuLi/radix_sort-fix

#130 fixed radix sort for python 3
This commit is contained in:
Harshil 2017-10-17 18:50:05 +05:30 committed by GitHub
commit 54eb79f53a

View File

@ -10,7 +10,7 @@ def radixsort(lst):
# split lst between lists # split lst between lists
for i in lst: for i in lst:
tmp = i / placement tmp = i // placement
buckets[tmp % RADIX].append( i ) buckets[tmp % RADIX].append( i )
if maxLength and tmp > 0: if maxLength and tmp > 0:
maxLength = False maxLength = False