% copied from one of UIUC courses by Chandra Chekuri. I can't find the exact link now...https://courses.grainger.illinois.edu/cs598cci/sp2020/
\def\begin@lg{\begin{minipage}{1in}\begin{tabbing}
    \quad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\kill}
  \def\end@lg{\end{tabbing}\end{minipage}}
  
  \newenvironment{algorithm}
  {\begin{tabular}{|l|}\hline\begin@lg}
  {\end@lg\\\hline\end{tabular}}
  
  \newenvironment{algo}
  {\begin{center}\begin{algorithm}}
  {\end{algorithm}\end{center}}