\State\texttt{Skip = True}; \Comment{Stop the BFS}
\Else
\State Compute the farness; \Comment{BFS reached the end}
\State\texttt{Top.pop\textunderscore back}; \Comment{Remove the last element}
\State Add the new node, in order of farness;
\State update \texttt{Q, enqueued};
\EndIf
\EndWhile
\end{algorithmic}
\end{algorithm}
\nd In Algorithm \ref*{alg:lowerbound-technique} we use a list \texttt{Top} containing the top analyzed (yet) nodes in increasing order of farness. Then we need a vector of booleans \texttt{enqueued} to see which nodes we put in the queue during the BFS. During the BFS we need a "FIFO" priority queue \texttt{Q}. All the technical details are left to the reader in the GitHub repository.