From 5d96748b7ff5ae2ef8c51f1dabdea214b23bba69 Mon Sep 17 00:00:00 2001 From: Yudong Jin Date: Tue, 29 Nov 2022 20:20:36 +0800 Subject: [PATCH] Update quick_sort.md --- docs/chapter_sorting/quick_sort.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/chapter_sorting/quick_sort.md b/docs/chapter_sorting/quick_sort.md index 35af10d04..72ffe31e4 100644 --- a/docs/chapter_sorting/quick_sort.md +++ b/docs/chapter_sorting/quick_sort.md @@ -57,7 +57,7 @@ comments: true swap(nums, i, j); // 交换这两个元素 } swap(nums, i, left); // 将基准数交换至两子数组的分界线 - return i; // 返回分界线的索引 + return i; // 返回基准数的索引(即分界线的位置) } ``` @@ -83,7 +83,7 @@ comments: true swap(nums, i, j); // 交换这两个元素 } swap(nums, i, left); // 将基准数交换至两子数组的分界线 - return i; // 返回分界线的索引 + return i; // 返回基准数的索引(即分界线的位置) } ``` @@ -103,7 +103,7 @@ comments: true nums[i], nums[j] = nums[j], nums[i] # 将基准数交换至两子数组的分界线 nums[i], nums[left] = nums[left], nums[i] - return i # 返回分界线的索引 + return i # 返回基准数的索引(即分界线的位置) ``` !!! note "快速排序的分治思想"