// n es el tamaño
void ShellSort(tipo_dato *vector, int n)
{
int h, j;
tipo_dato tmp;
h = n/2;
while (h>0) // Realiza las pasadas
{
int i;
for (i=h; i<n; i++)
{
tmp = vector[i];
j = i;
while (j-h > 0)
{
if (tmp < vector[j-h])
{
vector[j] = vector[j-h];
j = j-h;
}
else
break;
}
a[j] = tmp;
}
h = h/2;
}
}