From 2234611ae6482c406948ae517daa685ddfc872a5 Mon Sep 17 00:00:00 2001 From: Marz Rover Date: Fri, 6 Sep 2024 19:08:02 -0400 Subject: [PATCH] fix docs for getParentIndex --- Sources/Heap/Heap.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Heap/Heap.swift b/Sources/Heap/Heap.swift index 787718d..afbb71e 100644 --- a/Sources/Heap/Heap.swift +++ b/Sources/Heap/Heap.swift @@ -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 }