链表题作为面试中的常常常客,没有什么诀窍,也没有什么超难题。只要吃饱饭、睡好觉、思路清晰就能做出来。
- Leetcode2: Add Two Numbers
- Leetcode19: Remove Nth Node From End of List
- Leetcode24: Swap Nodes in Pairs
- Leetcode61: Rotate List
- Leetcode83: Remove Duplicates from Sorted List
- Leetcode82: Remove Duplicates from Sorted List II
- Leetcode86: Partition List
- Leetcode92: Reverse Linked List II
- Leetcode138: Copy List with Random Pointer 也是剑指offer35:复杂链表的复制
- Leetcode141: Linked List Cycle
- Leetcode142: Linked List Cycle II
- Leetcode143: Reorder List
- Leetcode147: Insertion Sort List
- Leetcode148: Sort List
- Leetcode160: Intersection of Two Linked Lists
- Leetcode203: Remove Linked List Elements
- Leetcode206: Reverse Linked List
- Leetcode234: Palindrome Linked List
- Leetcode237: Delete Node in a Linked List
- Leetcode328: Odd Even Linked List
- Leetcode445: Add Two Numbers II
- Leetcode707: Design Linked List
- Leetcode725: Split Linked List in Parts
- Leetcode817: Linked List Components
- Leetcode21: Merge Two Sorted Lists
- Leetcode430: Flatten a Multilevel Doubly Linked List
以上就是面试中经常会考到的有关链表的题,笔者认为考链表题就是考察对内存和指针的理解与灵活运用能力,没有好的办法,多刷多做多理解就行。