ALGORITMOS DE BÚSQUEDA Y ORDENACIÓN
ALGORITMOS DE BÚSQUEDA Y ORDENACIÓN
ALGORITMOS DE BÚSQUEDA Y ORDENACIÓN
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>ALGORITMOS</strong> <strong>DE</strong> <strong>BÚSQUEDA</strong><br />
EN ARRAYS<br />
• Surgen de la necesidad de conocer tanto si<br />
un dato se encuentra o no dentro de una<br />
colección como de la posición que ocupa.<br />
• Búsqueda(vector,elemento):<br />
– i∈{1,....,n} si existe tal elemento<br />
– 0 en otro caso<br />
• Estructura de datos:<br />
const<br />
N=100;<br />
type<br />
tIntervalo=0..N;<br />
tvector=array[1..N] of tElem {tipo ordinal}