Skip to content

Commit 321d492

Browse files
htkuankeon
authored andcommitted
fix error if max_number is a multiple of 10 (#511)
1 parent 84b1415 commit 321d492

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

algorithms/sort/radix_sort.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def radix_sort(arr, simulation=False):
1010
if simulation:
1111
print("iteration", iteration, ":", *arr)
1212

13-
while position < max_number:
13+
while position <= max_number:
1414
queue_list = [list() for _ in range(10)]
1515

1616
for num in arr:

0 commit comments

Comments
 (0)