反转链表

题目来源
www.acwing.com/problem/content/33/
题目
定义一个函数,输入一个链表的头结点,反转该链表并输出反转后链表的头结点。
思考题
请同时实现迭代版本和递归版本。
样例
1 | 输入:1->2->3->4->5->NULL |
AC代码
1 | /** |
Comments
Comment plugin failed to load
Loading comment plugin