Skip to content

Commit d4a2e6b

Browse files
authored
Cleaning docs
1 parent 6227bd8 commit d4a2e6b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Sources/Algorithms/PartialSort.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ extension Sequence {
2828
///
2929
/// If you need to sort a sequence but only need access to a prefix of its
3030
/// elements, using this method can give you a performance boost over sorting
31-
/// the entire sequence.
31+
/// the entire sequence.
3232
///
3333
/// - Parameter count: The k number of elements to partially sort.
3434
/// - Parameter areInIncreasingOrder: A predicate that returns true if its
3535
/// first argument should be ordered before its second argument;
36-
/// otherwise, false.
36+
/// otherwise, false.
3737
///
3838
/// - Complexity: O(k log n)
3939
public func partiallySorted(
@@ -64,7 +64,7 @@ extension Sequence where Element: Comparable {
6464
///
6565
/// If you need to sort a sequence but only need access to a prefix of
6666
/// its elements, using this method can give you a performance boost over
67-
/// sorting the entire sequence.
67+
/// sorting the entire sequence.
6868
///
6969
/// - Parameter count: The k number of elements to partially sort
7070
/// in ascending order.
@@ -199,10 +199,11 @@ extension MutableCollection where Self: RandomAccessCollection {
199199
/// The heap is stored in reverse order, so sifting down will actually
200200
/// move the element up in the heap.
201201
///
202-
/// - Parameter i: The element index to sift down
202+
/// - Parameter i: The element index to sift down.
203203
/// - Parameter by: The predicate to use when determining the priority
204-
/// of elements in the heap
205-
/// - Parameter heapEndIndex: The index in reverse order, where the heap ends.
204+
/// of elements in the heap.
205+
/// - Parameter heapEndIndex: The index, in reverse order,
206+
/// where the heap ends.
206207
private mutating func siftDown(
207208
_ i: Int,
208209
by priority: Priority,

0 commit comments

Comments
 (0)