Last Updated: 1/7/10 10:14 AM CSE 2011 Prof. J. Elder - 66 - Additional Methods of the Adaptable Priority Queue ADT ±remove(e): Remove from P and return entry e.±replaceKey(e,k): Replace with k and return the old key;an error condition occurs if k is invalid (that is, k cannot be compared with other keys). ±replaceValue(e,x): Replace with x and return the old value.
has intentionally blurred sections.
Sign up to view the full version.
Last Updated: 1/7/10 10:14 AM CSE 2011 Prof. J. Elder - 67 - Locating Entries ±In order to implement the operations remove(k), replaceKey(e), and replaceValue(k), we need fast ways of locating an entry e in a priority queue. ±We can always just search the entire data structure to find an entry e, but there are better ways for locating entries.