摘要:
题目链接:https://leetcode.com/problems/insertion-sort-list/ 题目分析: 其实搞清楚指针的变化就很容易 如下是代码: 阅读全文
posted @ 2016-05-24 15:44
Shirley_ICT
阅读(107)
评论(0)
推荐(0)
摘要:
题目链接: https://leetcode.com/problems/reorder-list/ 分析: 注意这里寻找中间节点的时候需要增加一个哑巴节点,否则1->2这种就会出错,具体代码如下: 阅读全文
posted @ 2016-05-24 12:57
Shirley_ICT
阅读(165)
评论(0)
推荐(0)
摘要:
题目链接:https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ 分析: 设置三个指针,pre, cur, next, 然后进行模拟删除操作,比较简单,具体代码如下: 阅读全文
posted @ 2016-05-24 11:25
Shirley_ICT
阅读(128)
评论(0)
推荐(0)

浙公网安备 33010602011771号