摘要:
题目: Reverse a singly linked list. 思路: 以1—>2->3->4为例,链表反转的过程如下: 第一次循环结束: head: 2->3->4->NULL newhead: 1->NULL 第二次循环结束: head: 3->4->NULL newhead: 2->1-> 阅读全文
摘要:
题目: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 阅读全文