Review: Linked List Problems Posted on January 22, 2018July 26, 2020 by braindenny 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. Name Summary How to sort a linkedlist Leverage an array of pointers Top 5 Linkedlist Problems Num Problem Summary 1 Merge k Sorted Lists LeetCode: Merge k Sorted Lists 2 Detect cycle for a linked list LeetCode: Linked List Cycle 3 Swap odd with even nodes Leetcode: Swap Nodes in Pairs 4 LFU cache with double linkedlist LeetCode: LFU Cache 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: Sort List CheatSheet: Leetcode For Code Interview CheatSheet: Common Code Problems & Follow-ups See all linkedlist problems: #linkedlist Review: Linked List ProblemsLintCode: Middle of Linked ListLintCode: Insert Node in Sorted Linked ListLintCode: Find Node in Linked ListLintCode: Count Linked List NodesLintCode: Convert Linked List to Array ListLintCode: Convert Array List to Linked ListLeetCode: Swap Nodes in PairsLeetCode: Strobogrammatic Number IIILeetCode: Split Linked List in PartsLeetCode: Sort the Matrix DiagonallyLeetCode: Sort ListLeetCode: Rotate ListLeetCode: Robot Room CleanerLeetCode: RLE IteratorLeetCode: Reverse Nodes in k-GroupLeetCode: Reverse Linked List IILeetCode: Reverse Linked ListLeetCode: Reorder ListLeetCode: Remove Zero Sum Consecutive Nodes from Linked ListLeetCode: Remove Nth Node From End of ListLeetCode: Remove Linked List ElementsLeetCode: Remove Duplicates from Sorted List IILeetCode: Remove Duplicates from Sorted ListLeetCode: Rearrange String k Distance ApartLeetCode: Range Sum Query 2D – MutableLeetCode: Print Immutable Linked List in ReverseLeetCode: Plus One Linked ListLeetCode: Partition ListLeetCode: Palindrome Linked ListLeetCode: Optimal Account BalancingLeetCode: Odd Even Linked ListLeetCode: Numbers At Most N Given Digit SetLeetCode: Nth Magical NumberLeetCode: N-Queens IILeetCode: N-QueensLeetCode: Minimum Window SubsequenceLeetCode: Minimum Time to Build BlocksLeetCode: Middle of the Linked ListLeetCode: Merge Two Sorted ListsLeetCode: Merge k Sorted ListsLeetCode: Maximum Equal FrequencyLeetCode: LRU CacheLeetCode: Longest Common PrefixLeetCode: Linked List Cycle IILeetCode: Linked List CycleLeetCode: Linked List ComponentsLeetCode: LFU CacheLeetCode: Largest Plus SignLeetCode: Kth Smallest Element in a BSTLeetCode: Keyboard RowLeetCode: K Empty SlotsLeetCode: Judge Route CircleLeetCode: Intersection of Two Linked ListsLeetCode: Intersection of Two Arrays IILeetCode: Insertion Sort ListLeetCode: Insert into a Cyclic Sorted ListLeetCode: Flip Columns For Maximum Number of Equal RowsLeetCode: Flatten Binary Tree to Linked ListLeetCode: Flatten a Multilevel Doubly Linked ListLeetCode: Encode String with Shortest LengthLeetCode: Encode N-ary Tree to Binary TreeLeetCode: Divide ChocolateLeetCode: Design Linked ListLeetCode: Delete Node in a Linked ListLeetCode: Copy List with Random PointerLeetCode: Convert Binary Search Tree to Sorted Doubly Linked ListLeetCode: Adding Two Negabinary NumbersLeetCode: Add Two Numbers IILeetCode: Add Two Numbers See more blog posts. Post Views: 9