Exemplo n.º 1
0
 public bool MoveNext()
 {
     if (!HasNext())
     {
         return(false);
     }
     Current = _copy.DelMin();
     return(true);
 }
Exemplo n.º 2
0
        private void InsertTransactions(IEnumerable <string> list)
        {
            foreach (var line in list)
            {
                var transaction = new Transaction(line);
                _pq.Insert(transaction);
            }

            // remove minimum if M+1 entries on the PQ
            if (_pq.Size() > _m)
            {
                _pq.DelMin();
            }
        }