PriorityQueue

public struct PriorityQueue<T>
  • Declaration

    Swift

    public init(sort: @escaping (T, T) -> Bool)
  • Declaration

    Swift

    public var isEmpty: Bool { get }
  • Declaration

    Swift

    public var count: Int { get }
  • Declaration

    Swift

    public func peek() -> T?
  • Declaration

    Swift

    public mutating func enqueue(_ element: T)
  • Declaration

    Swift

    public mutating func dequeue() -> T?
  • Declaration

    Swift

    public mutating func changePriority(index i: Int, value: T)