Loading...
1. 题目描述 problem link 在一个排序的链表中,存在重复的结点,请删除该链表中重复的结点,重复的结点不保留,返回链表头指针。 例如,链表1->2->3->3-&g...
1. 题目描述 problem link Write a program to find the node at which the intersection of two singly lin...
1. 题目描述 A linked list is given such that each node contains an additional random pointer which co...
1. 题目描述 problem link Given a singly linked list, determine if it is a palindrome. Example 1: Inpu...
1. 链表分类 区分链表的种类可以从三个方向,是否有头节点、是否是单链表和是否循环。 根据这三个属性可以把链表分为2^3 = 8种。其中无头不循环单链表和有头循环双向链表最常用。 2. 头节点对...
1. 题目描述 problem link Remove all elements from a linked list of integers that have value val. Exam...
1. 题目描述 problem link Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤...
最近做了几道翻转链表的题,写个博客汇总一下,翻转链表的各种方法。 1. 翻转完整链表 1.1. 递归 核心思想就是递归嘛,把翻转全部单链表分解成翻转head->next到末尾的全部节点,然...