public PriorityQueue(IEnumerable <T> elements, IComparer <T> comparer) { this.comparer = new AllowDuplicatesComparer(comparer); this.elements = new SortedSet <T>(elements, this.comparer); }
public PriorityQueue(IComparer <T> comparer) { this.comparer = new AllowDuplicatesComparer(comparer); this.elements = new SortedSet <T>(this.comparer); }