Skip to content

Instantly share code, notes, and snippets.

@mitliagkas
Created November 12, 2015 00:43
Show Gist options
  • Save mitliagkas/bac9c97fc85e45dad921 to your computer and use it in GitHub Desktop.
Save mitliagkas/bac9c97fc85e45dad921 to your computer and use it in GitHub Desktop.
Latex Algorithm Listing (taken from ICML 2015 stylefile)
\begin{algorithm}[tb]
\caption{Bubble Sort}
\label{alg:example}
\begin{algorithmic}
\STATE {\bfseries Input:} data $x_i$, size $m$
\REPEAT
\STATE Initialize $noChange = true$.
\FOR{$i=1$ {\bfseries to} $m-1$}
\IF{$x_i > x_{i+1}$}
\STATE Swap $x_i$ and $x_{i+1}$
\STATE $noChange = false$
\ENDIF
\ENDFOR
\UNTIL{$noChange$ is $true$}
\end{algorithmic}
\end{algorithm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment