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. Target Readers Hot100 learners who want a reusable linked-list two-pointer template Developers who often confuse “same value” with “same node” Engineers working with shared tail structures in chain-like data Background / Motivation This problem looks simple, but it forces you to separate three concepts: ...

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

Hot100: Spiral Matrix (Boundary Shrinking Simulation ACERS Guide)

Subtitle / Summary Spiral traversal looks like “just printing in a fancy order”, but the real difficulty is getting boundaries and invariants right. This ACERS guide gives a reusable boundary-shrinking template and runnable multi-language solutions. Reading time: 12–15 min Tags: Hot100, matrix, simulation, boundary shrinking SEO keywords: Hot100, Spiral Matrix, clockwise traversal, boundary shrinking, LeetCode 54 Meta description: O(mn) spiral order traversal using boundary shrinking, with pitfalls, engineering scenarios, and runnable code. Target Readers Hot100 learners who want a reliable “matrix simulation” template Intermediate engineers who often get boundary cases wrong Anyone working with grids (visualization, raster data, path generation) Background / Motivation Matrix problems are notorious for being “easy to code, hard to get 100% correct”. One extra loop or one missed boundary check can break single-row/single-column cases or cause duplicated output. ...

February 3, 2026 · 13 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. Target Readers Hot100 learners building core templates Engineers handling capacity/volume constraints Anyone who wants a clean O(n) solution Background / Motivation Trapped water is a proxy for “capacity under boundary constraints.” It appears in cache headroom estimation, buffer overflow analysis, and terrain capacity modeling. The naive O(n^2) method is too slow; the two-pointer approach reduces it to O(n). ...

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

Hot100: Maximum Subarray (Kadane O(n) ACERS Guide)

Subtitle / Summary Maximum Subarray is the classic 1D DP / greedy template. This ACERS guide explains Kadane’s idea, engineering use cases, and runnable multi-language solutions. Reading time: 10–12 min Tags: Hot100, dynamic programming, greedy SEO keywords: Maximum Subarray, Kadane, dynamic programming, O(n), Hot100 Meta description: Kadane O(n) maximum subarray sum with engineering scenarios and multi-language code. Target Readers Hot100 learners building stable templates Engineers analyzing peak segments in time series Anyone who wants a clean O(n) solution Background / Motivation Maximum subarray sum appears in P&L streaks, KPI lift windows, anomaly bursts, and throughput gains. The naive O(n^2) enumeration does not scale. Kadane’s algorithm solves it in one pass. ...

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