Skip to content

Commit

Permalink
Fix docs for getParentIndex (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
marzvrover authored Sep 6, 2024
2 parents 9bdaadd + 2234611 commit 001884b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Heap/Heap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ extension Heap {
/// Calculates the parent index for any given index
///
/// - parameters:
/// - child: the parent index
/// - returns: right child index
/// - child: the child index
/// - returns: the parent index
internal static func getParentIndex(_ child: Int) -> Int {
return (child - 1) / 2
}
Expand Down

0 comments on commit 001884b

Please sign in to comment.