FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix error if max_number is a multiple of 10 (#511) · Mu-L/algorithms-python@321d492 · GitHub

Commit 321d492

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎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)

Back | FazBrowse Home | New Git URL