public void Reset() { pqCopy = new MaxPriorityQueue <T>(); for (int i = 1; i < pq.Count; i++) { pqCopy.Insert(pq[i]); } first = true; }
public MaxPQEnumerator(IList <T> pq) { this.pq = pq; pqCopy = new MaxPriorityQueue <T>(); for (int i = 1; i < pq.Count; i++) { pqCopy.Insert(pq[i]); } first = true; }