写一算法:借助于栈将一个单链表逆置

[复制链接]
查看11 | 回复2 | 2008-10-5 19:48:00 | 显示全部楼层 |阅读模式
链表和栈要自己写代码定义

回复

使用道具 举报

千问 | 2008-10-5 19:48:00 | 显示全部楼层
#include #include typedef struct _LinkList{ struct _LinkList *next;} LinkList; LinkList* ReverseList_L(LinkList *head){ LinkList *prior, *cur, *next, *temp; prior = NULL; cur = head; next = head->next; while (next != NULL) {cur->next = prior;temp = next->next;next-...
回复

使用道具 举报

千问 | 2008-10-5 19:48:00 | 显示全部楼层
http://www.cnblogs.com/aceofspades/archive/2008/10/05/1304056.html...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行