I have the following code that generated error
! LaTeX Error: Something's wrong--perhaps a missing \item.
l.193 \STATE
\label{alg:line3}Sort NGs in CDR in ascending order based o...
\usepackage[noend]{algorithmic}
\usepackage{algorithm}
{\scriptsize
\begin{algorithm}
\caption{An Algorithm}
\label{alg1}
\begin{algorithmic}[1]
\REQUIRE a set of candidate data records $CDRs$
\ENSURE a set of re-segmented data records $DRs$
\STATE \label{alg:line1}Sort CDRs in ascending order based on their vertical positions
\FOR\label{alg:line2}{each CDR $\in$ CDRs}
%the error happened at the following line
\STATE \label{alg:line3}Sort NGs in CDR in ascending order based on their vertical positions
%some other code
}
so I am wondering how to solve the issue.
cheers
