Skip to content

Commit 6064e3b

Browse files
authored
Merge pull request krahets#259 from dshlstarr/patch-1
fix the Golang code for median in quick_sort.md
2 parents 736e368 + ea3eee8 commit 6064e3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/chapter_sorting/quick_sort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ comments: true
483483
func medianThree(nums []int, left, mid, right int) int {
484484
if (nums[left] > nums[mid]) != (nums[left] > nums[right]) {
485485
return left
486-
} else if (nums[mid] < nums[left]) != (nums[mid] > nums[right]) {
486+
} else if (nums[mid] > nums[left]) != (nums[mid] > nums[right]) {
487487
return mid
488488
}
489489
return right

0 commit comments

Comments
 (0)