對一個單向鏈表進行逆序

一個逆序單向鏈表的簡單程序spa //定義的結構體 typedef struct Node { int data; Node *next; }Node; Node *Reverselist( Node *head) { //有效性判斷 if(head == NULL || head->next == NULL) return head; Node *p1 = head; Nod
相關文章
相關標籤/搜索