摘要: 题目连接:click~/*题意:将链表中第m到n个结点翻转 *//** *思路:为更好处理表头和第m个结点,引入root结点,同时记录 * 第m-1个结点。从第m个结点开始遍历至第n个结点,将已经 * 遍历过的结点插入在第m-1个结点后,并保证第m个结点的next * ... 阅读全文
posted @ 2015-04-07 18:03 天丶下 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 题目连接:https://leetcode.com/problems/remove-nth-node-from-end-of-list//** * Definition for singly-linked list. * struct ListNode { * int val; * ... 阅读全文
posted @ 2015-04-07 18:00 天丶下 阅读(94) 评论(0) 推荐(0) 编辑