From ae269921eb940cb5505327126711aa8ff6315072 Mon Sep 17 00:00:00 2001 From: Antti H S Laaksonen Date: Fri, 10 Mar 2017 14:17:04 +0200 Subject: [PATCH] Fix variable name [closes #21] --- chapter12.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter12.tex b/chapter12.tex index fe77bac..5cf87bc 100644 --- a/chapter12.tex +++ b/chapter12.tex @@ -331,7 +331,7 @@ and the array \texttt{e} will contain the distances to all nodes in the graph. The search can be implemented as follows: \begin{lstlisting} -z[s] = 1; e[x] = 0; +z[x] = 1; e[x] = 0; q.push(x); while (!q.empty()) { 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 so that no adjacent nodes have the same color. Even when $k=3$, no efficient algorithm is known -but the problem is NP-hard. \ No newline at end of file +but the problem is NP-hard.