\setcounter{AlgoLine}{0}
\DontPrintSemicolon
	{\KwIn{A trivial partial solution $s$ (generally $\varnothing$); set $E$ of elements constituting a solution; incremental cost function $c(s, e)$}
		\KwResult{Complete solution $s$}
		$R \leftarrow E$\tcp*[r]{Elements that can be added to $s$}
		\While{$R \neq \varnothing$ }
		{$ \forall e \in R$, compute $c(s, e)$\\
			Choose $e'$ optimizing $c(s, e')$\\
			$s \leftarrow s \cup e'$\tcp*[r]{Include $e'$ in the partial solution $s$}
			Remove from $R$ the elements that cannot be added any more to $s$\\
		}
	}

