Method UpdateTop
UpdateTop()
Should be called when the Object at top changes values. Still log(n) worst case, but it's at least twice as fast to
pq.Top.Change();
pq.UpdateTop();
instead of
o = pq.Pop();
o.Change();
pq.Push(o);
Declaration
public T UpdateTop()
Returns
Type | Description |
---|---|
T | The new 'top' element. |