Skip to content

Commit 379609b

Browse files
rockbrunoxwu
andauthored
Update Sources/Algorithms/PartialSort.swift
Co-authored-by: Xiaodi Wu <[email protected]>
1 parent 23bf863 commit 379609b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Algorithms/PartialSort.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ extension Collection {
5353
if let last = result.last, try areInIncreasingOrder(last, e) {
5454
continue
5555
}
56-
let insertionIndex = try result.partitioningIndex { try areInIncreasingOrder(e, $0) }
56+
let insertionIndex =
57+
try result.partitioningIndex { try areInIncreasingOrder(e, $0) }
5758
result.removeLast()
5859
result.insert(e, at: insertionIndex)
5960
}

0 commit comments

Comments
 (0)