diff --git a/chapter04.tex b/chapter04.tex index 9ae6bdc..c33c3c7 100644 --- a/chapter04.tex +++ b/chapter04.tex @@ -605,10 +605,10 @@ \subsubsection{Priority queue} maintains a set of elements. The supported operations are insertion and, depending on the type of the queue, -retrieval and removal of +lookup and removal of either the minimum or maximum element. Insertion and removal take $O(\log n)$ time, -and retrieval takes $O(1)$ time. +and lookup takes $O(1)$ time. While an ordered set efficiently supports all the operations of a priority queue, diff --git a/chapter13.tex b/chapter13.tex index f318a98..463352f 100644 --- a/chapter13.tex +++ b/chapter13.tex @@ -553,7 +553,7 @@ \subsubsection{Implementation} An appropriate data structure for this is a priority queue that contains the nodes ordered by their distances. Using a priority queue, the next node to be processed -can be retrieved in logarithmic time. +can be looked up in constant and removed in logarithmic time. In the following code, the priority queue \texttt{q} contains pairs of the form $(-d,x)$,