This commit is contained in:
krahets
2023-04-09 05:12:22 +08:00
parent 01d05cc1f0
commit 37f11aff68
27 changed files with 265 additions and 248 deletions

View File

@@ -76,7 +76,7 @@ comments: true
```python title="counting_sort.py"
def counting_sort_naive(nums: list[int]) -> None:
""" 计数排序 """
"""计数排序"""
# 简单实现,无法用于排序对象
# 1. 统计数组最大元素 m
m = 0
@@ -346,7 +346,7 @@ $$
```python title="counting_sort.py"
def counting_sort(nums: list[int]) -> None:
""" 计数排序 """
"""计数排序"""
# 完整实现,可排序对象,并且是稳定排序
# 1. 统计数组最大元素 m
m = max(nums)