2

I am trying to write up a data structure in my algorithm.

\documentclass[]{IEEEtran}
\usepackage{algorithm,algpseudocode}

\begin{document}

\begin{algorithm}
\caption{Algorithm1}
\begin{algorithmic}[1]
    *This is where I want my structure to go*    

    code....

\end{algorithmic}
\end{algorithm}

\end{document}

I have seen alternatives such as using:

\usepackage{algorithm2e}

and defining my own:

\SetKwProg{struct}{struct}{ contains}{end}

Is there a way to define a structure such that I am still using algorithmic?

Another solution I came up with was to use the following:

\algnewcommand\algorithmicstruct{\textbf{Structure}}
\algnewcommand\Structure{\item[\algorithmicstruct]}

However, this results in the word Structure being placed on an unnumbered line. Does anyone know how to use this command such that it becomes part of the remaining code and gets a number as any other line?