Fix variable name [closes #21]
This commit is contained in:
parent
6d97177d7d
commit
ae269921eb
|
@ -331,7 +331,7 @@ and the array \texttt{e} will contain the
|
||||||
distances to all nodes in the graph.
|
distances to all nodes in the graph.
|
||||||
The search can be implemented as follows:
|
The search can be implemented as follows:
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
z[s] = 1; e[x] = 0;
|
z[x] = 1; e[x] = 0;
|
||||||
q.push(x);
|
q.push(x);
|
||||||
while (!q.empty()) {
|
while (!q.empty()) {
|
||||||
int s = q.front(); q.pop();
|
int s = q.front(); q.pop();
|
||||||
|
@ -546,4 +546,4 @@ it is difficult to find out if the nodes
|
||||||
in a graph can be colored using $k$ colors
|
in a graph can be colored using $k$ colors
|
||||||
so that no adjacent nodes have the same color.
|
so that no adjacent nodes have the same color.
|
||||||
Even when $k=3$, no efficient algorithm is known
|
Even when $k=3$, no efficient algorithm is known
|
||||||
but the problem is NP-hard.
|
but the problem is NP-hard.
|
||||||
|
|
Loading…
Reference in New Issue