单链表的倒序

偶尔看到这么个单链表的倒序,觉得写的算法很好(可能我很少去研究算法的原因吧),不画图发现自己还真不知道怎么写的: 单链表的倒序: struct student *reverse(struct student *head) { struct student *p1,*p2,*p3; p2=head;p3=head->next; do { p1=p2;p2=p3;p3=p2->next;p2->nex
相关文章
相关标签/搜索