DoubleLink rev_double(DoubleLink L,int n)
{
if(L==NULL||L->next==NULL)
return L;
DoubleLink p=L;
L=L->next;
p->next=NULL;
DoubleLink t;
printf("%d",n);
for(int i=0;i<n-1;i++)
{
t=L;
L=L->next;
t->next=p;
p->prev=t;
t->prev=NULL;
p=t;
}
return p;
}