\setcounter{AlgoLine}{0}
\DontPrintSemicolon
	\KwData{Directed network $R = (V, E, w)$ given with an arc list, a starting node $s$}
	\KwResult{Immediate predecessor $pred_j$ of $j$ on a shortest path from $s$ to $j$ with its length $\lambda_j$, $\forall j \in V$, or: warning message of the existence of a negative length circuit}
	\ForAll{$i \in V$}{$\lambda_i \leftarrow \infty$ ; $pred_i \leftarrow \varnothing$}
	$\lambda_s \leftarrow 0$\\
	$k \leftarrow 0$ \tcp*[r]{Step counter}
	$continue \leftarrow true$ \tcp*[r]{At least one $\lambda$ modified at last step}
	\While{$k < |V|$ and $continue$}
	{
		$continue \leftarrow false$\\
		$k \leftarrow k+1$\\
		\ForAll{arc $(i,j) \in E$}
		{
			\If{$\lambda_j > \lambda_i + w(i,j)$}
			{$\lambda_j \leftarrow \lambda_i + w(i,j)$\\
				$pred_j \leftarrow i$\\
				$continue \leftarrow true$
			}
		}
	}
	\If{$k = |V|$}{Warning: there is a negative length circuit that can be reached from $s$}

