Skip to content

Commit 66db524

Browse files
Update README.markdown
Update document for Hoare's partitioning scheme
1 parent 78af3a3 commit 66db524

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Quicksort/README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func partitionHoare<T: Comparable>(inout a: [T], low: Int, high: Int) -> Int {
288288
repeat { i += 1 } while a[i] < pivot
289289

290290
if i < j {
291-
swap(&a[i], &a[j])
291+
a.swapAt(i, j)
292292
} else {
293293
return j
294294
}

0 commit comments

Comments
 (0)