Change arrays indicating visitiveness of nodes to bool[] from int[]

This commit is contained in:
Linkus000 2017-04-02 12:40:59 +02:00
parent f9e091b66a
commit 75f2d11c82
1 changed files with 3 additions and 2 deletions

View File

@ -133,7 +133,7 @@ vector<int> v[N];
\end{lstlisting}
and also maintains an array
\begin{lstlisting}
int z[N];
bool z[N];
\end{lstlisting}
that keeps track of the visited nodes.
Initially, each array value is 0,
@ -323,7 +323,8 @@ of the queue is the next node to be processed.
In addition, the code uses arrays
\begin{lstlisting}
int z[N], e[N];
bool z[N];
int e[N];
\end{lstlisting}
so that the array \texttt{z} indicates
which nodes the search has already visited