Class FibonacciHeap<E>

Fibonacci heap (min-heap) optimized for fast merges and amortized operations.

Time O(1), Space O(1)

examples will be generated by unit test

Type Parameters

  • E

Constructors

Accessors

Methods

  • Remove and return the minimum element, consolidating the root list.

    Returns undefined | E

    Minimum element or undefined.

    Time O(log N) amortized, Space O(1)

  • Push an element into the root list.

    Parameters

    • element: E

      Element to insert.

    Returns this

    This heap.

    Time O(1) amortized, Space O(1)