Skip to content

Commit 435a38c

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

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
@@ -43,7 +43,8 @@ extension Collection {
4343
// Make sure we are within bounds.
4444
let prefixCount = Swift.min(count, self.count)
4545

46-
// If we're attempting to prefix more than 10% of the collection, it's faster to sort everything.
46+
// If we're attempting to prefix more than 10% of the collection, it's
47+
// faster to sort everything.
4748
guard prefixCount < (self.count / 10) else {
4849
return Array(try sorted(by: areInIncreasingOrder).prefix(prefixCount))
4950
}

0 commit comments

Comments
 (0)