mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
commit
bb3287ac0a
|
@ -9,9 +9,10 @@ def radixsort(lst):
|
|||
buckets = [list() for _ in range( RADIX )]
|
||||
|
||||
# split lst between lists
|
||||
for i in lst:
|
||||
tmp = i // placement
|
||||
buckets[tmp % RADIX].append( i )
|
||||
for i in lst:
|
||||
tmp = int((i / placement) % RADIX)
|
||||
buckets[tmp].append(i)
|
||||
|
||||
if maxLength and tmp > 0:
|
||||
maxLength = False
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user