Merge pull request #157 from Sayan97/patch-1

Update radix_sort.py
This commit is contained in:
Harshil 2017-11-01 10:49:05 +05:30 committed by GitHub
commit bb3287ac0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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