Structurefwcd.swift-utils 4.6.2Utils
BinaryHeap
BinaryHeap.swift:1struct BinaryHeap<E> where E : Comparable
struct BinaryHeap<E> where E : Comparable
import Utils
protocol Comparable : Equatable
A type that can be compared using the relational operators <
, <=
, >=
, and >
.
protocol PriorityQueue
A data structure that allows efficient insertion and dequeueing of prioritized items.
init()
var count: Int { get }
mutating func insert(_ element: E)
mutating func popMax() -> E?
typealias Element = E
init<S>(_ elements: S) where S : Sequence, Self.Element == S.Element
var isEmpty: Bool { get }
protocol Sendable