206 链表逆置
ListNode* reverseList(ListNode* head) {
if(head== nullptr)
return head;
ListNode *rear= nullptr,*front=nullptr;
while(head!= nullptr){
front=head->next;
head->next=rear;
rear=head;
head=front;
}
return rear;
}