Skip to content

Commit

Permalink
fix docs for getParentIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
marzvrover committed Sep 6, 2024
1 parent 9bdaadd commit 2234611
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 2234611

Please sign in to comment.