# writing a data structure in an algorithm [closed]

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?

## closed as unclear what you're asking by Mensch, Raaja, user156344, Stefan Pinnow, SebastianoApr 2 at 6:25

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.