反轉單鏈表

struct Node{ int data; struct Node *next; }; Node* ReverseList(Node *head){ Node *pre, *cur, *next; if(head == NULL || head->next == NULL) return head; cur = head->next; pre = head; pre->nex
相關文章
相關標籤/搜索