/*
* main.c
*链表逆转
* Created on: Nov 6, 2010
* Author: jenson
*/
#include <stdio.h>
typedef node * link;
struct node {
int item;
link next;
};
link reverse(link x){
link t,y = x,r = NULL;
while(y!=NULL){
t = y->next;
y->nextt = r;
r = y;
y = t;
}
return r;
}
int main(){
return 0;
}
* main.c
*链表逆转
* Created on: Nov 6, 2010
* Author: jenson
*/
#include <stdio.h>
typedef node * link;
struct node {
int item;
link next;
};
link reverse(link x){
link t,y = x,r = NULL;
while(y!=NULL){
t = y->next;
y->nextt = r;
r = y;
y = t;
}
return r;
}
int main(){
return 0;
}
转载于:https://blog.51cto.com/wujuxiang/416227