Create a FibonacciHeap.
Optionalcomparator: Comparator<E>Comparator to order elements (min-heap by default).
New FibonacciHeap instance.
Get the current minimum node.
Min node or undefined.
Get the circular root list head.
Root node or undefined.
Collect nodes from a circular doubly linked list starting at head.
Optionalhead: FibonacciHeapNode<E>Start node of the circular list.
Array of nodes from the list.
Meld another heap into this heap.
Another FibonacciHeap to meld into this one.
void
Insert a node into a parent's child list (circular).
Parent node.
Child node to insert.
void
Push an element into the root list.
Element to insert.
This heap.
Fibonacci heap (min-heap) optimized for fast merges and amortized operations.
Remarks
Time O(1), Space O(1)
Example