csdn的账号密码忘记了,悲剧。当时用的马甲邮箱注册的,找也找不回来了。。
既然如此,就来cnblog混了。
没怎么写过blog,先熟悉下。刚刚正好看到一篇文章说面试招人的时候好多人连反转单向链表都不会。试着写了两行,正好用来看看怎么发代码的。
1 node *reverselist(node *head)
2 {
3 node *temp,*current,*tail;
4 tail=NULL;
5 for(current=head;current!=NULL;current=temp)
6 {
7 temp=current->next;
8 current->next=tail;
9 tail=current;
10
11 }
12 return tail;
13 }
这个语法高亮貌似看起来不行啊,是设置不对还是什么情况。先去上课,晚上在看。
浙公网安备 33010602011771号