Should additional groups like \begin{algorithm} ... \end{algorithm} be generally avoided and the use of \algorithm...\endalgorithm be preferred?
By additional is meant, that there is at least one other group. For clarification see this answer and it's comments.
Some answers where it's told to do so:
I also made small changes to the environment definitions. The \begin and \end are not needed. They add an additional group and will lead to misleading error messages if there is some erroneous input.
from Typesetting chord progressions
Secondly, rather than writing \begin{algorithm}...\end{algorithm} inside your environment I would just use \algorithm...\endalgorithm. The two are almost the same except that that the first version puts everything inside its' own group, which isn't really necessary here because your environment starts its own group.
from Multiple Counters on algorithm
I'm unsure if When to use or avoid grouping? is related.
Where it isn't done:
In Group statements, avoid pagebreak the use of \begin{xyz} ... \end{xyz} is chosen.
\newlength{\foolen} \newenvironment{foo}{\setlength{\foolen}{17pt}}{}
\begin{document}
\begin{foo}
\end{foo}
\the\foolen
\foo \endfoo \the\foolen
\end{document}
– Aug 18 '17 at 20:47. The grouping mechanism is established within the environment, so\fooand\endfooare sufficient. Using\fooand\endfoooutside of the environment group there will be no group, unless\fooand\endfooare explicitly defined this way, see the various examples inlatex.ltx`\end...instead of\end{...}, as far as I know – Aug 18 '17 at 21:02