\usepackage[boxed,algoruled,linesnumbered,vlined,longend]{algorithm2e}
\SetKwFor{For}{for $($}{$)$}{}
\SetKwFor{ForAll}{for all $($}{$)$}{}
\SetKwFor{If}{if $($}{$)$}{}
\SetKwFor{ElseIf}{else if $($}{$)$}{}
\newcommand{\Call}[2]{\textsc{#1}(#2)}
\SetFuncSty{textsc}
\DontPrintSemicolon

\newenvironment{algoritmo}[1][htbp]
{
    \begingroup
    \renewcommand{\algorithmcfname}{Algoritmo}
    \begin{algorithm}[#1]
}
{
    \end{algorithm}
    \endgroup
}