add bubble sort documentation
This commit is contained in:
parent
2419f57c8c
commit
9a29347198
@ -12,6 +12,17 @@
|
||||
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm,a4paper]{geometry}
|
||||
\usepackage{amsmath}
|
||||
|
||||
\usepackage{listings}
|
||||
\lstset{
|
||||
basicstyle=\footnotesize\ttfamily,
|
||||
columns=flexible,
|
||||
breaklines=true
|
||||
}
|
||||
|
||||
\usepackage{hyperref}
|
||||
\hypersetup{pdftex,colorlinks=true,allcolors=black,bookmarks}
|
||||
\usepackage{hypcap}
|
||||
|
||||
\pretitle{%
|
||||
\begin{center}
|
||||
\LARGE
|
||||
@ -59,6 +70,7 @@ Xavier Canales
|
||||
\subsection{Quick Sort}
|
||||
|
||||
\subsection{Bubble Sort}
|
||||
\lstinputlisting{psuedo/bubblesort.txt}
|
||||
|
||||
\subsection{Bitonic Sort}
|
||||
|
||||
|
9
doc/psuedo/bubblesort.txt
Normal file
9
doc/psuedo/bubblesort.txt
Normal file
@ -0,0 +1,9 @@
|
||||
cuentaDeElementos := n
|
||||
repetir
|
||||
haCambiado := falso
|
||||
disminuir cuentaDeElementos
|
||||
repetir con indice desde 1 a cuentaDeElementos
|
||||
if (elemento en indice) > (elemento en (indice + 1))
|
||||
intercambiar (elemento en indice) con (elemento en (indice + 1))
|
||||
haCambiado := falso
|
||||
hasta haCambiado = verdad
|
Loading…
Reference in New Issue
Block a user