翻转链表
例如:
输入: 1->2->3->4->5->NULL
输出: 5->4->3->2->1->NULL
struct ListNode* reverseList(struct ListNode* head) {
struct ListNode* new, * cur, * next;
cur = head;
new = NULL;
while (cur) {
next = cur->next;
cur->next = new;
new = cur;
cur = next;
}
return new;
}