mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
#130 fixed radix sort for python 3
This commit is contained in:
parent
aa8485b4df
commit
edcf6d54b6
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user