链表逆置
struct ListNode *reverse(struct ListNode *head)
{
if(head==NULL||head->next==NULL)
{
return head;
}
struct ListNode *p=NULL,*t,*pp=head;
while(pp)
{
t=pp->next;
pp->next=p;
p=pp;
pp=t;
}
return p;
}