mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 16:57:32 +08:00
refactor: Move constants outside of variable scope (#7262)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -5,6 +5,8 @@ Source: https://en.wikipedia.org/wiki/Radix_sort
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
RADIX = 10
|
||||
|
||||
|
||||
def radix_sort(list_of_ints: list[int]) -> list[int]:
|
||||
"""
|
||||
@ -19,7 +21,6 @@ def radix_sort(list_of_ints: list[int]) -> list[int]:
|
||||
>>> radix_sort([1,100,10,1000]) == sorted([1,100,10,1000])
|
||||
True
|
||||
"""
|
||||
RADIX = 10 # noqa: N806
|
||||
placement = 1
|
||||
max_digit = max(list_of_ints)
|
||||
while placement <= max_digit:
|
||||
|
Reference in New Issue
Block a user