Linked List demands skills of managing pointers very well.

Most problems are not that hard for you to solve. But to get bug-free, you need to think it through.

Key Points:

- Add a dummyNode, if head node might be changed
- How to process current node?

Make sure the pointers are in-order

- How to move to next node?

If you have changed the original node, the next pointer might not be what you want

- Whether we need to maintain the previous node?

Common Problems:

- Insert a Node in Sorted List
- Remove a Node from Linked List 3. Reverse a Linked List
- Merge Two Linked Lists
- Find the Middle of a Linked List

The most impressive problems to me:

See all linkedlist problems: #linkedlist

- Review: Linked List Problems
- LintCode: Middle of Linked List
- LintCode: Insert Node in Sorted Linked List
- LintCode: Find Node in Linked List
- LintCode: Count Linked List Nodes
- LintCode: Convert Linked List to Array List
- LintCode: Convert Array List to Linked List
- Leetcode: Swap Nodes in Pairs
- Leetcode: Stream of Characters
- Leetcode: Split Linked List in Parts
- Leetcode: Split Array Largest Sum
- Leetcode: Sort List
- Leetcode: Rotate List
- Leetcode: RLE Iterator
- Leetcode: Reverse Nodes in k-Group
- Leetcode: Reverse Linked List II
- Leetcode: Reverse Linked List
- Leetcode: Reveal Cards In Increasing Order
- Leetcode: Reorder List
- Leetcode: Remove Nth Node From End of List
- Leetcode: Remove Linked List Elements
- Leetcode: Remove Duplicates from Sorted List II
- Leetcode: Remove Duplicates from Sorted List
- Leetcode: Previous Permutation With One Swap
- Leetcode: Plus One Linked List
- Leetcode: Partition List
- Leetcode: Palindrome Linked List
- Leetcode: Out of Boundary Paths
- Leetcode: Online Stock Span
- Leetcode: Online Election
- Leetcode: Odd Even Linked List
- Leetcode: Numbers At Most N Given Digit Set
- Leetcode: Number of Longest Increasing Subsequence
- Leetcode: Nth Magical Number
- Leetcode: Most Stones Removed with Same Row or Column
- Leetcode: Middle of the Linked List
- Leetcode: Merge Two Sorted Lists
- Leetcode: Merge k Sorted Lists
- Leetcode: Maximum Width Ramp
- Leetcode: Linked List Cycle II
- Leetcode: Linked List Cycle
- Leetcode: Linked List Components
- Leetcode: Kth Smallest Number in Multiplication Table
- Leetcode: Knight Dialer
- Leetcode: Intersection of Two Linked Lists
- Leetcode: Insufficient Nodes in Root to Leaf Paths
- Leetcode: Insertion Sort List
- Leetcode: Insert into a Cyclic Sorted List
- Leetcode: Flower Planting With No Adjacent
- Leetcode: Flatten Binary Tree to Linked List
- Leetcode: Flatten a Multilevel Doubly Linked List
- Leetcode: Find K-th Smallest Pair Distance
- Leetcode: Exam Room
- Leetcode: Design Linked List
- Leetcode: Delete Node in a Linked List
- Leetcode: Delete Columns to Make Sorted II
- Leetcode: Copy List with Random Pointer
- Leetcode: Convert Binary Search Tree to Sorted Doubly Linked List
- Leetcode: Broken Calculator
- Leetcode: Binary String With Substrings Representing 1 To N
- Leetcode: Bag of Tokens
- Leetcode: Available Captures for Rook
- Leetcode: Array of Doubled Pairs
- Leetcode: Add Two Numbers II
- Leetcode: Add Two Numbers

See more blog_posts.

Share It, If You Like It.