I'm trying to restate/repeat/recall an algorithm in an appendix with the same numbering, etc., but I haven't found an easy way to do it. I'm using the algorithm environment and algorithm2e package.
Ideally, I want something like the restatable environment in the thmtools package, but for algorithms instead of theorems. The answer here illustrates this with lemmas. Does this or something like it exist?
Edit: Here is a MWE using restatable:
\begin{restatable}{algorithm}{solver}
\caption{Problem Solver}
Solve problem.
\end{restatable}
\appendix
\section*{Appendix}
\solver*
This gives something like:
Algorithm 1: Problem Solver
1 Solve problem.
Appendix
Algorithm 2: Problem Solver
1 Solve problem.
However, I would like both to say "Algorithm 1".