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