Update quick_sort.py

This commit is contained in:
timi 2022-11-26 01:01:34 +08:00 committed by GitHub
parent db9faf98e1
commit 4be25e5273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
""" 快速排序类 """
class QuickSort(object):
""" 哨兵划分 """
def partition(self, nums, left, right):
# 以 nums[left] 作为基准数