/// <summary> /// Inserts the specified priority-value pair into the queue. /// </summary> /// <param name="priorityValuePair">The priority-value pair.</param> /// <remarks>O(log n).</remarks> public PriorityQueue <T, TPriority> Insert(PriorityValuePair <T, TPriority> priorityValuePair) { return(new PriorityQueue <T, TPriority>(_ft.Insert(priorityValuePair))); }
/// <summary> /// Inserts the specified item into the sequence. /// </summary> /// <param name="item">The item.</param> /// <remarks>O(log n).</remarks> public OrderedSequence <T> Insert(T item) { return(new OrderedSequence <T>(_ft.Insert(new Element(item)))); }