• Inserts the new item to the heap. It takes O(log n) to insert, but also takes O(n) to copy the items.

    Type Parameters

    • T

    Parameters

    • item: T

      To insert.

    Returns (<S>(heap) => Mut<S, never[]>)

    The inserted new heap.

Generated using TypeDoc