Skip to content

Commit 001884b

Browse files
authored
Fix docs for getParentIndex (#8)
2 parents 9bdaadd + 2234611 commit 001884b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Sources/Heap/Heap.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ extension Heap {
8282
/// Calculates the parent index for any given index
8383
///
8484
/// - parameters:
85-
/// - child: the parent index
86-
/// - returns: right child index
85+
/// - child: the child index
86+
/// - returns: the parent index
8787
internal static func getParentIndex(_ child: Int) -> Int {
8888
return (child - 1) / 2
8989
}

0 commit comments

Comments
 (0)