逆置链表

来源:互联网 发布:软件计划 编辑:程序博客网 时间:2024/04/27 21:03
#include<stdio.h>struct SqList{int value;struct SqList *next;};void reverse(struct SqList *L){struct SqList *p;struct SqList *q;p=L->next;L->next=NULL;while(p){q=p->next;p->next=L->next;L->next=p;p=q;}
        printf("\n逆置链表:");
}

原创粉丝点击