LeetCode 19: Remove Nth Node From End of List (One-pass Two Pointers) ACERS Guide

Subtitle / Summary The hard part is not deletion itself, but locating the predecessor of the nth node from the end in a singly linked list. This article derives the one-pass two-pointer solution from simpler baselines and explains correctness, boundaries, and engineering transfer. Reading time: 12-15 min Tags: linked list, two pointers, interview high frequency SEO keywords: LeetCode 19, Remove Nth Node From End of List, linked list, fast/slow pointers, dummy node Meta description: A complete ACERS walkthrough for removing the nth node from the end: from brute force to one-pass two pointers, with complexity, pitfalls, engineering scenarios, and Python/C/C++/Go/Rust/JS implementations. Target Readers Beginners building a stable template for linked-list interview problems Developers who know fast/slow pointers but still make boundary mistakes Backend/system engineers who want to transfer problem-solving templates to chain-structured data in production Background / Motivation “Remove the nth node from the end” is a classic medium-level linked-list problem. The challenge is usually not the delete operation itself, but: ...

February 12, 2026 · 12 min · map[name:Jeanphilo]

LeetCode 138: Copy List with Random Pointer — A Complete Deep-Copy Breakdown

Subtitle / Abstract The real challenge in this problem is not traversing the list, but correctly cloning the cross-node reference relationships created by random pointers. This article moves from naive intuition to a hash-mapping solution, and explains why it is stable, maintainable, and practical in real engineering. Estimated reading time: 12–16 minutes Tags: Linked List, Deep Copy, Hash Table, Random Pointer SEO keywords: LeetCode 138, Copy List with Random Pointer, random list copy, deep copy, hash mapping Meta description: Perform deep copy of a random-pointer linked list via two passes plus a mapping table, with correctness, complexity, engineering practice, and six-language implementations. Target Readers Developers who feel shaky on random pointer problems while practicing LeetCode Learners who want to clearly understand “shallow copy vs deep copy” Engineers who want to transfer algorithmic thinking to real object-copy scenarios Background / Motivation For a normal linked list, copying val and next is straightforward. A random-pointer list adds one more pointer, random, which can: ...

February 11, 2026 · 12 min · map[name:Jeanphilo]

LeetCode 2: Add Two Numbers from Naive to Optimal Carry Simulation

Subtitle / Summary This problem is just grade-school addition on a linked list: add one digit at a time, propagate carry, and append one final node if carry remains after both lists end. We move from naive ideas to the optimal one-pass solution, then map it to real engineering scenarios. Reading time: 12-15 min Tags: linked list, carry, simulation, LeetCode 2 SEO keywords: Add Two Numbers, LeetCode 2, reverse-order list, carry, dummy node Meta description: Use dummy + tail + carry to sum two reverse-order linked lists in O(max(m,n)) time, with common pitfalls, engineering analogies, and six-language runnable implementations. Target Readers Beginners building a stable template for linked-list problems Intermediate developers who often miss carry or boundary cases Engineers who want to transfer algorithmic thinking to stream-style data processing Background / Motivation This looks like an entry-level LeetCode problem, but it trains practical skills you will reuse: ...

February 11, 2026 · 14 min · map[name:Jeanphilo]

Hot100: Sort List Linked-List Merge Sort ACERS Guide

Subtitle / Summary LeetCode 148 is not about whether you can sort; it is about choosing the right sorting strategy for linked-list constraints. For singly linked lists, merge sort fits naturally: split by middle, sort recursively, merge linearly. Reading time: 12-16 min Tags: Hot100, linked list, merge sort, divide and conquer SEO keywords: Sort List, linked list merge sort, LeetCode 148, Hot100 Meta description: A practical ACERS guide for LeetCode 148 with derivation, complexity analysis, engineering mappings, and runnable code in multiple languages. Target Readers Hot100 learners building reusable linked-list templates Developers who struggle with split-and-reconnect pointer safety Engineers who want a clear answer to “why merge sort for linked lists” Background / Motivation Sorting linked structures appears in real systems: ...

February 10, 2026 · 9 min · map[name:Jeanphilo]

Hot100: Merge K Sorted Lists Divide-and-Conquer O(N log k) ACERS Guide

Subtitle / Summary LeetCode 23 is a k-way merge problem, not just repeating LeetCode 21 in a loop. This ACERS guide derives the optimal structure, explains tradeoffs between divide-and-conquer and min-heap, and provides runnable implementations in multiple languages. Reading time: 12-16 min Tags: Hot100, linked list, divide and conquer, merge SEO keywords: Merge K Sorted Lists, LeetCode 23, divide and conquer, O(N log k), Hot100 Meta description: A full ACERS explanation of Merge K Sorted Lists from naive ideas to O(N log k) divide-and-conquer, with engineering mapping and multi-language code. Target Readers Hot100 learners who have finished LeetCode 21 and want the next-level merge template Developers who need predictable performance for k-way ordered data merge Engineers preparing for linked-list and divide-and-conquer interview rounds Background / Motivation This problem appears in many production forms: ...

February 10, 2026 · 11 min · map[name:Jeanphilo]

Hot100: Linked List Cycle II Floyd Detection + Entry Localization ACERS Guide

Subtitle / Summary LeetCode 142 upgrades cycle detection into cycle entry localization. The robust template is Floyd: first detect a meeting inside the cycle, then reset one pointer to head and move both by one step; the next meeting node is the cycle entry. Reading time: 12-16 min Tags: Hot100, linked list, fast slow pointers, Floyd SEO keywords: Linked List Cycle II, cycle entry, Floyd, fast slow pointers, O(1) space, LeetCode 142, Hot100 Meta description: Floyd cycle detection + entry localization with proof intuition, engineering mapping, and runnable multi-language implementations in O(n) time and O(1) extra space. Target Readers Hot100 learners who want to fully internalize the 141 -> 142 linked-list template family Developers who need to locate where a pointer chain becomes cyclic Interview candidates who want to explain why “reset to head” works Background / Motivation In real systems, cycle corruption in chain structures can cause: ...

February 10, 2026 · 9 min · map[name:Jeanphilo]

Hot100: Merge Two Sorted Lists Sentinel Two-Pointer Merge ACERS Guide

Subtitle / Summary This problem is the linked-list version of merge-sort’s merge step. Use a sentinel node plus two pointers to splice nodes in ascending order in O(m+n), without rebuilding the list. Reading time: 10-12 min Tags: Hot100, linked list, merge, two pointers SEO keywords: Merge Two Sorted Lists, sentinel node, linked list merge, LeetCode 21, Hot100 Meta description: A complete ACERS guide for LeetCode 21 with derivation, correctness invariants, pitfalls, and runnable multi-language code. Target Readers Hot100 learners preparing linked-list interview templates Developers who often lose nodes while rewiring next Engineers who need stable O(1)-extra-space merge patterns Background / Motivation This is a small problem with large transfer value: ...

February 10, 2026 · 10 min · map[name:Jeanphilo]

Hot100: Reverse Nodes in k-Group Group-Wise In-Place ACERS Guide

Subtitle / Summary LeetCode 25 is the upgrade path from 206 (full reversal) and 92 (interval reversal): split by groups, reverse inside each full group, reconnect safely, and keep the last incomplete group unchanged. Reading time: 14-18 min Tags: Hot100, linked list, group reversal, dummy node SEO keywords: Reverse Nodes in k-Group, group reversal, LeetCode 25, Hot100 Meta description: In-place k-group linked-list reversal with dummy-node anchoring and safe reconnection, including pitfalls, complexity, and runnable multi-language implementations. Target Readers Hot100 learners who already finished 206/92 and want the next linked-list jump Developers who often fail at boundary handling and reconnection in pointer-heavy tasks Engineers building reusable templates for chunk-based list transformation Background / Motivation In real systems, chain structures are often processed in batches: ...

February 10, 2026 · 11 min · map[name:Jeanphilo]

Hot100: Reorder List In-Place Split-Reverse-Merge ACERS Guide

Subtitle / Summary Reorder List is a classic pointer choreography problem: find middle, reverse second half, then merge alternately. This guide derives the in-place O(n)/O(1) method from naive ideas and turns it into a reusable Hot100 template. Reading time: 12-15 min Tags: Hot100, linked list, in-place SEO keywords: Reorder List, split reverse merge, LeetCode 143, O(1) space Meta description: A full ACERS explanation of Reorder List with correctness intuition, boundary handling, engineering mapping, and runnable code in Python/C/C++/Go/Rust/JS. Target Readers Hot100 learners who want a stable linked-list rewire template Developers who can reverse lists but still fail on alternating merge details Engineers preparing for interviews where O(1) extra space is required Background / Motivation At first glance, this looks like simple reordering. In reality, it tests whether you can safely perform three dependent pointer operations in one workflow: ...

February 10, 2026 · 10 min · map[name:Jeanphilo]

Hot100: Reverse Linked List II Dummy Node + Head-Insertion ACERS Guide

Subtitle / Summary Reverse Linked List II is not about full-list reversal; it is about reversing a strict middle interval while preserving both outer connections. This ACERS guide explains the dummy-node anchor, head-insertion loop, and boundary-safe implementation. Reading time: 12-15 min Tags: Hot100, linked list, sublist reversal, dummy node SEO keywords: Reverse Linked List II, sublist reversal, dummy node, head insertion, LeetCode 92, Hot100 Meta description: In-place sublist reversal with dummy node + head insertion in O(n)/O(1), with correctness intuition, pitfalls, and runnable multi-language code. Target Readers Hot100 learners who already know 206 and want the interval version Developers who often fail at linked-list boundary handling (left = 1, right = n) Engineers building reusable pointer-rewiring templates Background / Motivation LeetCode 206 reverses the whole list. LeetCode 92 asks for a stricter operation: ...

February 10, 2026 · 10 min · map[name:Jeanphilo]