diff --git a/docs/chapter_sorting/quick_sort.md b/docs/chapter_sorting/quick_sort.md index 62ab2147f..01dbaec78 100644 --- a/docs/chapter_sorting/quick_sort.md +++ b/docs/chapter_sorting/quick_sort.md @@ -483,7 +483,7 @@ comments: true func medianThree(nums []int, left, mid, right int) int { if (nums[left] > nums[mid]) != (nums[left] > nums[right]) { return left - } else if (nums[mid] < nums[left]) != (nums[mid] > nums[right]) { + } else if (nums[mid] > nums[left]) != (nums[mid] > nums[right]) { return mid } return right