diff --git a/sorts/radix_sort.py b/sorts/radix_sort.py index 82f8a38b4..29b51ad42 100644 --- a/sorts/radix_sort.py +++ b/sorts/radix_sort.py @@ -9,9 +9,9 @@ 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