struct ListNode reverseList(struct ListNode head)
{
struct ListNode pre=NULL;
struct ListNode current=head;
while(current)
{
struct ListNode* next = current->next;
current->next=pre;
pre=current;
current=next;
}
return pre;
}