int jump_search(int* tab, int size, int to_find)
{
int step = (int)sqrt(size);
int i = 0;
int j;
if (tab[0] > to_find || tab[size - 1] < to_find) {
return (-1);
}
while (i < size && tab[i] < to_find) {
i += step;
}
if (i == to_find) {
return (i);
}
i -= (step - 1);
j = linear_search(&tab[i], step, to_find);
return (j != -1 ? j + i : -1);
}