Hot100: Add Two Numbers Linked-List Carry Simulation ACERS Guide

Subtitle / Summary LeetCode 2 is grade-school addition translated into a linked-list workflow. The only persistent state is the carry, and the only structural work is appending one new digit per round. Reading time: 12-15 min Tags: Hot100, linked list, carry, simulation SEO keywords: Add Two Numbers, linked-list carry, reverse order digits, LeetCode 2, Hot100 Meta description: A derivation-first ACERS guide to LeetCode 2 with carry propagation, dummy node construction, engineering mapping, and runnable multi-language code. A - Algorithm (Problem and Algorithm) Problem Restatement You are given two non-empty linked lists l1 and l2. Each list stores a non-negative integer in reverse order, and each node contains one digit. Add the two integers and return the sum as a linked list in the same reverse order. ...

April 20, 2026 · 17 min · map[name:Jeanphilo]

Hot100: Remove Nth Node From End of List One-Pass Two-Pointer ACERS Guide

Subtitle / Summary The hard part of LeetCode 19 is not deleting a node. It is locating the predecessor of the n-th node from the end in a singly linked list without walking backward. Reading time: 12-15 min Tags: Hot100, linked list, two pointers, dummy node SEO keywords: Remove Nth Node From End of List, one-pass two pointers, dummy node, LeetCode 19, Hot100 Meta description: A derivation-first ACERS explanation of LeetCode 19 with fixed-gap two pointers, dummy node boundary handling, engineering mapping, and runnable multi-language implementations. A - Algorithm (Problem and Algorithm) Problem Restatement Given the head of a linked list, remove the n-th node from the end of the list and return the head of the modified list. ...

April 20, 2026 · 14 min · map[name:Jeanphilo]

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. A — Algorithm (Problem and Algorithm) Problem Restatement Given a linked list of length n, each node has: ...

February 11, 2026 · 15 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. A — Algorithm (Problem & Algorithm) Problem Restatement You are given two non-empty linked lists representing two non-negative integers. Digits are stored in reverse order, and each node stores one digit. Return their sum as a linked list in the same reverse order. Except for number 0, the input numbers do not have leading zeros. ...

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. A - Algorithm (Problem and Algorithm) Problem Restatement Given the head of a linked list head, sort it in ascending order and return the sorted list. Required time complexity: O(n log n). ...

February 10, 2026 · 12 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. A - Algorithm (Problem and Algorithm) Problem Restatement Given an array lists of k sorted linked lists, merge them into one sorted linked list and return it. ...

February 10, 2026 · 14 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. A - Algorithm (Problem and Algorithm) Problem Restatement Given head of a singly linked list, return the node where the cycle begins. If there is no cycle, return null. ...

February 10, 2026 · 12 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. A - Algorithm (Problem and Algorithm) Problem Restatement Given heads list1 and list2 of two sorted linked lists, merge them into one sorted linked list and return its head. The merged list should be formed by splicing together nodes from the original lists. ...

February 10, 2026 · 12 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. A - Algorithm (Problem and Algorithm) Problem Restatement Given the head of a linked list and an integer k, reverse nodes in groups of size k and return the modified head. If the number of remaining nodes is less than k, keep them in original order. You must modify pointers, not just node values. ...

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