if((p - top) > (bottom - p))
{
push(p-l,&s);
push(top,&s);
top = p + l
}
else
push(bottom,&s);
push(p+1,&s);
bottom = p - 1;