Skip to content

Commit 8105b70

Browse files
committed
Update README.markdown
1 parent 82f8036 commit 8105b70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Kth Largest Element/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public func randomizedSelect<T: Comparable>(_ array: [T], order k: Int) -> T {
8888
var a = array
8989

9090
func randomPivot<T: Comparable>(_ a: inout [T], _ low: Int, _ high: Int) -> T {
91-
let pivotIndex = Int.random(min: low, max: high)
91+
let pivotIndex = Int.random(in: low...high)
9292
a.swapAt(pivotIndex, high)
9393
return a[high]
9494
}

0 commit comments

Comments
 (0)