Exemple #1
0
 public void Reset()
 {
     pqCopy = new MaxPriorityQueue <T>();
     for (int i = 1; i < pq.Count; i++)
     {
         pqCopy.Insert(pq[i]);
     }
     first = true;
 }
Exemple #2
0
            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;
            }