![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
soysoucegod
这个作者很懒,什么都没留下…
展开
-
LeetCode19:Remove Nth Node From End of List
题目如下: Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the end, the linked原创 2017-10-22 14:31:55 · 176 阅读 · 0 评论 -
LeetCode21:Merge Two Sorted Lists
题目如下: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 很经典的算法,这里贴出递归与非递归的解法。 非递归:/** * Definition for si原创 2017-10-22 16:03:40 · 148 阅读 · 0 评论