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]

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]

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. A - Algorithm (Problem and Algorithm) Problem Restatement Given the head of a singly linked list head, reorder it to: ...

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

Hot100: Linked List Cycle Floyd Fast/Slow Pointer ACERS Guide

Subtitle / Summary Detecting a cycle in a linked list is a pointer chasing problem, not a value comparison problem. This ACERS guide explains why Floyd’s fast/slow pointers must meet if a cycle exists, how to avoid null-pointer bugs, and how the same pattern maps to engineering checks. Reading time: 10-12 min Tags: Hot100, linked list, fast slow pointers, Floyd SEO keywords: Linked List Cycle, Floyd, fast slow pointers, LeetCode 141, Hot100 Meta description: O(n)/O(1) cycle detection in singly linked lists using Floyd fast/slow pointers, with alternatives, common mistakes, and runnable multi-language code. A - Algorithm (Problem and Algorithm) Problem Restatement Given head node head of a singly linked list, determine whether there is a cycle in the list. Return true if a cycle exists, else false. ...

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

Hot100: Intersection of Two Linked Lists Two-Pointer Switch-Head O(1) Space ACERS Guide

Subtitle / Summary The key is not comparing values, but comparing node identity (same object / same address). This ACERS guide explains the naive hash approach, the length-alignment approach, and the most practical switch-head two-pointer template, with runnable multi-language implementations under the no-modification and no-cycle constraints. Reading time: 10-14 min Tags: Hot100, linked list, two pointers SEO keywords: Intersection of Two Linked Lists, switch heads, O(1) space, LeetCode 160 Meta description: Two pointers walk A then B and B then A, guaranteeing meeting at the intersection or both reaching null within m+n steps, with O(m+n) time and O(1) space. A - Algorithm (Problem and Algorithm) Problem Restatement Given heads headA and headB of two singly linked lists, return the node where they intersect. If they do not intersect, return null. ...

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

Hot100: Trapping Rain Water (Two Pointers O(n) ACERS Guide)

Subtitle / Summary Trapping Rain Water is the classic boundary-constraint problem. This ACERS guide explains the two-pointer method, key formulas, and runnable multi-language solutions. Reading time: 12–15 min Tags: Hot100, two pointers, array SEO keywords: Trapping Rain Water, two pointers, left right max, O(n), Hot100 Meta description: Two-pointer O(n) trapped water solution with engineering scenarios and multi-language code. A — Algorithm Problem Restatement Given an array of non-negative integers representing bar heights (each width 1), compute how much water can be trapped after raining. ...

January 24, 2026 · 7 min · map[name:Jeanphilo]

LeetCode 1437: Check If All 1's Are at Least K Apart (ACERS Guide)

Subtitle / Summary A classic event-spacing validation model. This ACERS guide explains the one-pass logic, engineering use cases, and runnable multi-language solutions. Reading time: 10–12 min Tags: array, two pointers, event spacing SEO keywords: LeetCode 1437, event spacing, O(n) Meta description: One-pass validation for minimum spacing between 1s, with engineering use cases and multi-language code. A — Algorithm Problem Restatement Given an integer array nums and integer k, return true if every pair of 1s is at least k apart; otherwise return false. ...

January 22, 2026 · 7 min · map[name:Jeanphilo]