mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-05 11:41:22 +08:00
build
This commit is contained in:
@@ -382,7 +382,7 @@ comments: true
|
||||
=== "Python"
|
||||
|
||||
```python title="quick_sort.py"
|
||||
def quick_sort(self, nums: list[int], left: int, right: int) -> None:
|
||||
def quick_sort(self, nums: list[int], left: int, right: int):
|
||||
"""快速排序"""
|
||||
# 子数组长度为 1 时终止递归
|
||||
if left >= right:
|
||||
@@ -1027,7 +1027,7 @@ comments: true
|
||||
=== "Python"
|
||||
|
||||
```python title="quick_sort.py"
|
||||
def quick_sort(self, nums: list[int], left: int, right: int) -> None:
|
||||
def quick_sort(self, nums: list[int], left: int, right: int):
|
||||
"""快速排序(尾递归优化)"""
|
||||
# 子数组长度为 1 时终止
|
||||
while left < right:
|
||||
|
||||
Reference in New Issue
Block a user