priorityqueue
    Preparing search index...

    Class default<T>

    An implementation of Skew Heap.

    Type Parameters

    • T

    Hierarchy

    • BasePriorityQueue
      • default

    Implements

    Index

    Constructors

    Properties

    _kind: string
    _length: number = 0
    comparator: Comparator<T>
    root: Node<T> | null = null

    Accessors

    • get length(): number

      Returns size of the priority queue.

      Returns number

    Methods

    • Clear this priority queue.

      Returns void

    • Returns the priority queue is empty or not.

      Returns boolean

    • Pop the top element of the priority queue.

      Returns T

    • Push the element to the priority queue and returns self.

      Parameters

      • val: T

      Returns void

    • Write out the priority queue content as an Array.

      Returns T[]

    • Get the top element of the priority queue.

      Returns T