MinHeapRecursive
struct MinHeapRecursive<T> : Heap where T : Comparable
A MinHeapRecursive
using recursive heapify methods.
-
The storage array of the
Heap
Declaration
Swift
internal var storage: [T]
-
The
MinHeapRecursive
recursiveheapifyUp
starter method.Declaration
Swift
internal mutating func heapifyUp()
-
The
MinHeapRecursive
recursiveheapifyUp
algorithm.Declaration
Swift
internal mutating func heapifyUp(at index: Int)
Parameters
at
The index to
heapifyUp
from. -
The
MinHeapRecursive
recursiveheapifyDown
starter method.Declaration
Swift
internal mutating func heapifyDown()
-
The
MinHeapRecursive
recursiveheapifyDown
algorithm.Declaration
Swift
internal mutating func heapifyDown(at index: Int)
Parameters
at
The index to
heapifyDown
from.