<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Hot100 on Jeanphilo Blog</title><link>https://jeanphilogong.github.io/jeanblog/tags/hot100/</link><description>Recent content in Hot100 on Jeanphilo Blog</description><generator>Hugo -- 0.168.0</generator><language>en-us</language><lastBuildDate>Sat, 10 Oct 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://jeanphilogong.github.io/jeanblog/tags/hot100/index.xml" rel="self" type="application/rss+xml"/><item><title>LeetCode 49: Group Anagrams, from Scanning Groups to Building a Grouping Key</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/49-group-anagrams/</link><pubDate>Sat, 10 Oct 2026 10:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/49-group-anagrams/</guid><description>Build a Python solution one step at a time: compare two anagrams, scan group representatives, then derive sorted-string and character-count keys to understand why hash-table grouping works.</description></item><item><title>LeetCode 152: Maximum Product Subarray, Deriving Two DP States from a Negative Counterexample</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/152-maximum-product-subarray/</link><pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/152-maximum-product-subarray/</guid><description>Start by enumerating nonempty contiguous ranges, then use a negative counterexample to derive maximum and minimum product states and a constant-space Python solution.</description></item><item><title>LeetCode 279: Perfect Squares, Deriving Dynamic Programming from Remaining Sums</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/279-perfect-squares/</link><pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/279-perfect-squares/</guid><description>Start with a failed largest-square choice, then build recursion, memoization, and iterative dynamic programming to minimize the number of perfect squares.</description></item><item><title>LeetCode 139: Word Break, Starting from Prefix Reachability</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/139-word-break/</link><pubDate>Tue, 22 Sep 2026 12:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/139-word-break/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;h3 id="input-and-output"&gt;Input and Output&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Input: a string &lt;code&gt;s&lt;/code&gt; and a list of strings &lt;code&gt;wordDict&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Every element in &lt;code&gt;wordDict&lt;/code&gt; is an available word, and the same word may be reused&lt;/li&gt;
&lt;li&gt;Output: return &lt;code&gt;True&lt;/code&gt; if &lt;code&gt;s&lt;/code&gt; can be split into one or more dictionary words; otherwise, return &lt;code&gt;False&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The split must cover the entire string without skipping or reordering characters&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="examples"&gt;Examples&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: s = &amp;#34;leetcode&amp;#34;, wordDict = [&amp;#34;leet&amp;#34;, &amp;#34;code&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: True
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: &amp;#34;leetcode&amp;#34; can be split into &amp;#34;leet&amp;#34; + &amp;#34;code&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: s = &amp;#34;applepenapple&amp;#34;, wordDict = [&amp;#34;apple&amp;#34;, &amp;#34;pen&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: True
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: &amp;#34;apple&amp;#34; + &amp;#34;pen&amp;#34; + &amp;#34;apple&amp;#34;; the same word may be reused
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: s = &amp;#34;catsandog&amp;#34;, wordDict = [&amp;#34;cats&amp;#34;, &amp;#34;dog&amp;#34;, &amp;#34;sand&amp;#34;, &amp;#34;and&amp;#34;, &amp;#34;cat&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: False
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: some prefixes can be formed, but the split cannot cover the entire string
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="constraints"&gt;Constraints&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;1 &amp;lt;= s.length &amp;lt;= 300&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;1 &amp;lt;= wordDict.length &amp;lt;= 1000&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;1 &amp;lt;= wordDict[i].length &amp;lt;= 20&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;s&lt;/code&gt; and &lt;code&gt;wordDict[i]&lt;/code&gt; contain only lowercase English letters&lt;/li&gt;
&lt;li&gt;All strings in &lt;code&gt;wordDict&lt;/code&gt; are unique&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="step-1-make-the-completed-prefix-visible"&gt;Step 1: Make the Completed Prefix Visible&lt;/h2&gt;
&lt;p&gt;Start with one concrete question. For &lt;code&gt;s = &amp;quot;leetcode&amp;quot;&lt;/code&gt;, before deciding whether the whole string can be split, can we record how much of it has already been completed?&lt;/p&gt;</description></item><item><title>LeetCode 213: House Robber II, Splitting the Circle into Two Linear Problems</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/213-house-robber-ii/</link><pubDate>Tue, 22 Sep 2026 10:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/213-house-robber-ii/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;h3 id="input-and-output"&gt;Input and Output&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Input: an integer array &lt;code&gt;nums&lt;/code&gt;, where &lt;code&gt;nums[i]&lt;/code&gt; is the money in the &lt;code&gt;i&lt;/code&gt;-th house.&lt;/li&gt;
&lt;li&gt;The houses form a circle. Adjacent houses cannot both be robbed, so houses &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;n - 1&lt;/code&gt; cannot both be robbed either.&lt;/li&gt;
&lt;li&gt;Output: the maximum amount of money that can be robbed without triggering the alarm.&lt;/li&gt;
&lt;li&gt;Constraints: &lt;code&gt;1 &amp;lt;= nums.length &amp;lt;= 100&lt;/code&gt;, &lt;code&gt;0 &amp;lt;= nums[i] &amp;lt;= 1000&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="examples"&gt;Examples&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [2,3,2]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: 3
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: Houses 0 and 2 are adjacent around the circle, so they cannot both be robbed; rob the house containing 3.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [1,2,3,1]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: 4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: We can rob indices 0 and 2, or indices 1 and 3.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [1,2,3]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: 3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This tutorial uses Python only and starts with the smallest first-last conflict.&lt;/p&gt;</description></item><item><title>LeetCode 322: Coin Change, Deriving Unbounded Knapsack DP from Smaller Amounts</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/322-coin-change/</link><pubDate>Tue, 22 Sep 2026 00:00:00 +0000</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/322-coin-change/</guid><description>Start from a greedy failure and smaller-amount subproblems, then build an unbounded knapsack DP that finds the minimum number of coins.</description></item><item><title>LeetCode 300: Longest Increasing Subsequence, Deriving Sequence DP from Ending at i</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/300-longest-increasing-subsequence/</link><pubDate>Tue, 22 Sep 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/300-longest-increasing-subsequence/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;h3 id="input-and-output"&gt;Input and Output&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Input: an integer array &lt;code&gt;nums&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: return the length of the longest strictly increasing subsequence in &lt;code&gt;nums&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;A subsequence preserves the relative order of the original array, but it does not need to be contiguous, so elements may be skipped&lt;/li&gt;
&lt;li&gt;If the selected indices are &lt;code&gt;i_1 &amp;lt; i_2 &amp;lt; ... &amp;lt; i_k&lt;/code&gt;, they must also satisfy &lt;code&gt;nums[i_1] &amp;lt; nums[i_2] &amp;lt; ... &amp;lt; nums[i_k]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The subsequence is non-empty, so at least one element must be selected&lt;/li&gt;
&lt;li&gt;Constraints: &lt;code&gt;1 &amp;lt;= nums.length &amp;lt;= 2500&lt;/code&gt;, &lt;code&gt;-10^4 &amp;lt;= nums[i] &amp;lt;= 10^4&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="examples"&gt;Examples&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [10,9,2,5,3,7,101,18]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: 4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: [2,5,7,101] is a strictly increasing subsequence of length 4; its elements do not need to be contiguous in the original array.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [0,1,0,3,2,3]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: 4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: [0,1,2,3] has length 4; [0,1,3] is also valid, but shorter.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This article uses Python only. We start with the local question &amp;ldquo;how long can a subsequence ending at each position be?&amp;rdquo; and gradually turn it into a runnable solution.&lt;/p&gt;</description></item><item><title>LeetCode 416: Partition Equal Subset Sum, from the Half-Sum Target to Backward 0/1 Knapsack</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/416-partition-equal-subset-sum/</link><pubDate>Tue, 22 Sep 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/416-partition-equal-subset-sum/</guid><description>Start from the constraints of Partition Equal Subset Sum, build the 0/1 knapsack state step by step, and see why one-dimensional compression requires backward iteration.</description></item><item><title>LeetCode 155: Min Stack, Keeping the Minimum in Sync With Stack State</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/155-min-stack/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/155-min-stack/</guid><description>Start from restoring the previous minimum after pop, build a correct scan baseline, and derive an O(1) Min Stack with synchronized prefix minima.</description></item><item><title>LeetCode 20: Valid Parentheses, Why Equal Counts Are Not Enough</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/20-valid-parentheses/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/20-valid-parentheses/</guid><description>Start from the counterexample ([)], separate equal bracket counts from correct types and closing order, and derive an O(n) stack solution.</description></item><item><title>LeetCode 394: Decode String by Saving and Restoring Nested Context</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/394-decode-string/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/394-decode-string/</guid><description>Start from the context lost by nested encoding, build a correct recursive parser, and make its saved frames explicit with a stack.</description></item><item><title>LeetCode 84: Which Bar Limits a Contiguous Rectangle?</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/84-largest-rectangle-in-histogram/</link><pubDate>Mon, 20 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/84-largest-rectangle-in-histogram/</guid><description>Start from the shortest bar in a contiguous interval, build an interval baseline, then derive a linear monotonic-stack solution that settles maximal widths.</description></item><item><title>LeetCode 136: Single Number Without Growing Extra Storage</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/136-single-number/</link><pubDate>Wed, 15 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/136-single-number/</guid><description>Start from a set-based pairing baseline, derive XOR cancellation, and solve LeetCode 136 in O(n) time with O(1) extra space.</description></item><item><title>LeetCode 338: Counting Bits by Reusing Smaller Results</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/338-counting-bits/</link><pubDate>Wed, 15 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/338-counting-bits/</guid><description>Start by counting every value in 0..n independently, then derive answer[i] = answer[i &amp;amp; (i - 1)] + 1 for an O(n) solution.</description></item><item><title>LeetCode 739: Daily Temperatures and the First Warmer Day to the Right</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/739-daily-temperatures/</link><pubDate>Wed, 15 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/739-daily-temperatures/</guid><description>Start from an O(n^2) right-scan baseline, derive a monotonic stack of unresolved indices, and solve LeetCode 739 in O(n) time.</description></item><item><title>LeetCode 45: Jump Game II From Reachability to Minimum Jumps</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/45-jump-game-ii/</link><pubDate>Wed, 08 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/45-jump-game-ii/</guid><description>Solve LeetCode 45 Jump Game II in Python by upgrading the farthest reach idea from LeetCode 55 into a minimum-jump layer boundary with current_end and farthest.</description></item><item><title>LeetCode 435: Non-overlapping Intervals From Minimum Removals to Maximum Kept</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/435-non-overlapping-intervals/</link><pubDate>Mon, 06 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/435-non-overlapping-intervals/</guid><description>Solve LeetCode 435 in Python by turning minimum removals into maximum kept non-overlapping intervals, then deriving the earliest-ending interval greedy scan.</description></item><item><title>LeetCode 452: Minimum Number of Arrows From Shared Intersections to Interval Greedy</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/452-minimum-number-of-arrows-to-burst-balloons/</link><pubDate>Mon, 06 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/452-minimum-number-of-arrows-to-burst-balloons/</guid><description>Solve LeetCode 452 in Python by deriving arrow coverage from shared interval intersections, then compressing the baseline into an earliest-ending arrow_pos greedy scan.</description></item><item><title>LeetCode 121: Best Time to Buy and Sell Stock With Greedy</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/121-best-time-to-buy-and-sell-stock/</link><pubDate>Fri, 03 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/121-best-time-to-buy-and-sell-stock/</guid><description>Solve LeetCode 121 in Python by deriving the one-transaction greedy idea from the buy-before-sell constraint, an O(n^2) baseline, and the historical minimum price.</description></item><item><title>LeetCode 55: Jump Game With Farthest Reach Greedy</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/55-jump-game/</link><pubDate>Fri, 03 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/greedy/55-jump-game/</guid><description>Solve LeetCode 55 Jump Game in Python by deriving reachability from a zero barrier, a reachable-array baseline, and the farthest reachable range greedy.</description></item><item><title>LeetCode 200: Number of Islands With Union-Find</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/union-find/200-number-of-islands/</link><pubDate>Thu, 02 Jul 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/union-find/200-number-of-islands/</guid><description>Solve LeetCode 200 Number of Islands in Python by deriving land-only count, 2D-to-1D ids, Union-Find merges, and exactly when count decreases.</description></item><item><title>Union-Find Template: Derive find / union / count</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/union-find/union-find-template/</link><pubDate>Tue, 30 Jun 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/union-find/union-find-template/</guid><description>Derive the Python Union-Find template from a small set-merging task: parent, find, union, count, connected, and path compression.</description></item><item><title>LeetCode 208: Implement Trie (Prefix Tree) in Python</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/trie/208-implement-trie-prefix-tree/</link><pubDate>Thu, 25 Jun 2026 13:58:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/trie/208-implement-trie-prefix-tree/</guid><description>Solve LeetCode 208 in Python by deriving Trie node fields, children traversal, is_end, insert, search, startsWith, and the exact interface LeetCode expects.</description></item><item><title>Trie Template Guide: Node Fields, Child Traversal, and Loop Invariants</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/trie/trie-template/</link><pubDate>Thu, 25 Jun 2026 13:58:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/trie/trie-template/</guid><description>Build a Python Trie template from first principles: derive children, is_end, insert/search traversal, prefix lookup, and the loop invariants behind each method.</description></item><item><title>LeetCode 547: Number of Provinces, Turn an Adjacency Matrix into Connected Components</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/547-number-of-provinces/</link><pubDate>Fri, 29 May 2026 00:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/547-number-of-provinces/</guid><description>Turn LeetCode 547 Number of Provinces from direct connections in an adjacency matrix into connected component counting, then derive DFS, BFS, and Union Find solutions step by step.</description></item><item><title>LeetCode 198: House Robber, Deriving 1D DP from Rob or Skip</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/198-house-robber/</link><pubDate>Sun, 03 May 2026 14:33:39 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/198-house-robber/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;h3 id="input-and-output"&gt;Input and Output&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Input: an integer array &lt;code&gt;nums&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nums[i]&lt;/code&gt; is the money in the &lt;code&gt;i&lt;/code&gt;-th house&lt;/li&gt;
&lt;li&gt;Adjacent houses cannot both be robbed&lt;/li&gt;
&lt;li&gt;Output: return the maximum amount of money that can be robbed&lt;/li&gt;
&lt;li&gt;Constraints: &lt;code&gt;1 &amp;lt;= nums.length &amp;lt;= 100&lt;/code&gt;, &lt;code&gt;0 &amp;lt;= nums[i] &amp;lt;= 400&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="examples"&gt;Examples&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [1,2,3,1]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: 4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: rob indices 0 and 2, for 1 + 3 = 4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [2,7,9,3,1]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: 12
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Explanation: rob indices 0, 2, and 4, for 2 + 9 + 1 = 12
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This article uses Python only and derives 1D DP from the conflict between two choices.&lt;/p&gt;</description></item><item><title>LeetCode 78: Subsets, Derive the startIndex Backtracking Template</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/78-subsets/</link><pubDate>Sun, 03 May 2026 14:25:07 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/78-subsets/</guid><description>&lt;h2 id="problem-requirement"&gt;Problem Requirement&lt;/h2&gt;
&lt;h3 id="input--output"&gt;Input / Output&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;nums&lt;/code&gt;, with &lt;code&gt;1 &amp;lt;= nums.length &amp;lt;= 10&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Value range: &lt;code&gt;-10 &amp;lt;= nums[i] &amp;lt;= 10&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;All elements in &lt;code&gt;nums&lt;/code&gt; are distinct&lt;/li&gt;
&lt;li&gt;Output: return all possible subsets of &lt;code&gt;nums&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ordering: the result order does not matter, and subset element order is not the point&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example"&gt;Example&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [1,2,3]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This tutorial builds one minimal Python solution.&lt;/p&gt;
&lt;h2 id="start-from-the-search-tree-for-12"&gt;Start From the Search Tree for &lt;code&gt;[1,2]&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The smallest branching example is:&lt;/p&gt;</description></item><item><title>LeetCode 90: Subsets II, Derive Layer-Level Deduplication</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/90-subsets-ii/</link><pubDate>Sun, 03 May 2026 14:25:07 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/90-subsets-ii/</guid><description>&lt;h2 id="problem-requirement"&gt;Problem Requirement&lt;/h2&gt;
&lt;h3 id="input--output"&gt;Input / Output&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;nums&lt;/code&gt;, with &lt;code&gt;1 &amp;lt;= nums.length &amp;lt;= 10&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Value range: &lt;code&gt;-10 &amp;lt;= nums[i] &amp;lt;= 10&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nums&lt;/code&gt; may contain duplicates&lt;/li&gt;
&lt;li&gt;Output: return all unique subsets&lt;/li&gt;
&lt;li&gt;Ordering: the result order does not matter, but the same value sequence may appear only once&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example"&gt;Example&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Input: nums = [1,2,2]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Output: [[],[1],[1,2],[1,2,2],[2],[2,2]]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This tutorial starts with a correct but wasteful version, then derives sorting plus layer-level deduplication.&lt;/p&gt;
&lt;h2 id="start-from-duplicate-branches-in-122"&gt;Start From Duplicate Branches in &lt;code&gt;[1,2,2]&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The smallest example that exposes the issue is:&lt;/p&gt;</description></item><item><title>Hot100: Binary Tree Maximum Path Sum (Tree DP / Single-Side Gain ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/124-binary-tree-maximum-path-sum/</link><pubDate>Mon, 20 Apr 2026 10:01:46 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/124-binary-tree-maximum-path-sum/</guid><description>A practical guide to LeetCode 124 covering the key design split: return only the best single-side gain upward, while using the full path through the current node to update a global answer.</description></item><item><title>Hot100: Binary Tree Right Side View (Level Order Last-Node Rule ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/199-binary-tree-right-side-view/</link><pubDate>Mon, 20 Apr 2026 10:01:46 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/199-binary-tree-right-side-view/</guid><description>A practical guide to LeetCode 199 covering why the right side view is just the last node of each level, plus two stable solutions: level-order BFS and right-first DFS.</description></item><item><title>Hot100: Construct Binary Tree from Preorder and Inorder Traversal (Indexed Divide-and-Conquer ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/105-construct-binary-tree-from-preorder-and-inorder-traversal/</link><pubDate>Mon, 20 Apr 2026 10:01:46 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/105-construct-binary-tree-from-preorder-and-inorder-traversal/</guid><description>A practical guide to LeetCode 105 covering how preorder chooses the root, how inorder splits the subtrees, and how a hash map plus index recursion reduces reconstruction to O(n).</description></item><item><title>Hot100: Convert Sorted Array to Binary Search Tree (Midpoint Divide-and-Conquer ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/108-convert-sorted-array-to-binary-search-tree/</link><pubDate>Mon, 20 Apr 2026 10:01:46 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/108-convert-sorted-array-to-binary-search-tree/</guid><description>A practical guide to LeetCode 108 covering why the midpoint is the natural root, how sorted order and balance requirements work together, and how to build the BST with stable index recursion.</description></item><item><title>Hot100: Flatten Binary Tree to Linked List (Reverse Preorder Rewiring ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/114-flatten-binary-tree-to-linked-list/</link><pubDate>Mon, 20 Apr 2026 10:01:46 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/114-flatten-binary-tree-to-linked-list/</guid><description>A practical guide to LeetCode 114 covering why the flattened list must follow preorder order and how reverse preorder with a prev pointer gives a stable in-place rewiring strategy.</description></item><item><title>Hot100: Kth Smallest Element in a BST (Inorder Counting / Early Stop ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/230-kth-smallest-element-in-a-bst/</link><pubDate>Mon, 20 Apr 2026 10:01:46 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/230-kth-smallest-element-in-a-bst/</guid><description>A practical guide to LeetCode 230 covering why inorder traversal of a BST is sorted, how to count visits with an explicit stack, and how to stop immediately at the k-th node.</description></item><item><title>Hot100: Add Two Numbers Linked-List Carry Simulation ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/2-add-two-numbers/</link><pubDate>Mon, 20 Apr 2026 09:36:56 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/2-add-two-numbers/</guid><description>Add two non-negative integers stored in reverse-order linked lists by simulating grade-school addition with carry propagation. This ACERS guide derives the one-pass solution and includes runnable multi-language implementations.</description></item><item><title>Hot100: LRU Cache Hash Table + Doubly Linked List O(1) ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/146-lru-cache/</link><pubDate>Mon, 20 Apr 2026 09:36:56 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/146-lru-cache/</guid><description>Design an LRU cache where both get and put run in O(1) average time by combining a hash table with a doubly linked list. This ACERS guide derives the data-structure split and includes runnable multi-language implementations.</description></item><item><title>Hot100: Remove Nth Node From End of List One-Pass Two-Pointer ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/19-remove-nth-node-from-end-of-list/</link><pubDate>Mon, 20 Apr 2026 09:36:56 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/19-remove-nth-node-from-end-of-list/</guid><description>Remove the n-th node from the end of a singly linked list by turning backward counting into a fixed-gap two-pointer problem. This ACERS guide derives the one-pass solution and includes runnable multi-language code.</description></item><item><title>Hot100: Diameter of Binary Tree (Tree DP / Height Return ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/543-diameter-of-binary-tree/</link><pubDate>Sun, 19 Apr 2026 15:51:55 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/543-diameter-of-binary-tree/</guid><description>A practical guide to LeetCode 543 covering the key split between returned height and global diameter updates, plus engineering mappings and runnable multi-language implementations.</description></item><item><title>Hot100: Lowest Common Ancestor of a Binary Tree (Postorder Return Semantics ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/236-lowest-common-ancestor-of-a-binary-tree/</link><pubDate>Sun, 19 Apr 2026 15:51:55 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/236-lowest-common-ancestor-of-a-binary-tree/</guid><description>A practical guide to LeetCode 236 covering the return-value meaning in postorder recursion, when the current node becomes the answer, and why a node can be its own ancestor.</description></item><item><title>Hot100: Validate Binary Search Tree (Range Constraints / Inorder ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/98-validate-binary-search-tree/</link><pubDate>Sun, 19 Apr 2026 15:13:19 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/98-validate-binary-search-tree/</guid><description>A practical guide to LeetCode 98 covering ancestor range constraints, why parent-only checks fail, and two stable solutions: recursive bounds and inorder validation.</description></item><item><title>Hot100: N-Queens Incremental Build Tutorial</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/51-n-queens/</link><pubDate>Sun, 19 Apr 2026 14:49:56 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/51-n-queens/</guid><description>A teaching-first incremental tutorial for LeetCode 51 that grows the N-Queens solution from a tiny example and a minimal DFS into column and diagonal state optimization.</description></item><item><title>Hot100: Palindrome Partitioning (Backtracking / Palindrome Table ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/131-palindrome-partitioning/</link><pubDate>Sun, 19 Apr 2026 14:49:56 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/131-palindrome-partitioning/</guid><description>A practical guide to LeetCode 131 that builds string-partition backtracking from scratch and shows why a palindrome table makes the search cleaner and more reusable.</description></item><item><title>Hot100: Combination Sum (Backtracking / Pruning ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/39-combination-sum/</link><pubDate>Wed, 08 Apr 2026 16:22:57 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/39-combination-sum/</guid><description>A practical guide to LeetCode 39 that builds combination backtracking from scratch, explains remain-based state, and shows why sorting makes pruning safe.</description></item><item><title>Hot100: Permutations (used[] Backtracking ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/46-permutations/</link><pubDate>Fri, 03 Apr 2026 17:54:22 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/backtracking/46-permutations/</guid><description>A practical guide to LeetCode 46 covering used[] state tracking, leaf-only collection, and runnable multi-language implementations.</description></item><item><title>Hot100: Binary Tree Level Order Traversal (BFS / DFS ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/102-binary-tree-level-order-traversal/</link><pubDate>Mon, 16 Mar 2026 13:00:56 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/102-binary-tree-level-order-traversal/</guid><description>A practical guide to LeetCode 102 covering level-by-level BFS, level-size boundaries, DFS depth buckets, and runnable multi-language implementations.</description></item><item><title>Hot100: Symmetric Tree (Mirror Recursion / BFS ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/101-symmetric-tree/</link><pubDate>Mon, 16 Mar 2026 13:00:55 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/101-symmetric-tree/</guid><description>A practical guide to LeetCode 101 covering mirror recursion, pairwise BFS checks, symmetry contracts, and runnable multi-language implementations.</description></item><item><title>Hot100: Same Tree (Synchronous Recursion / BFS ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/100-same-tree/</link><pubDate>Mon, 16 Mar 2026 13:00:54 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/100-same-tree/</guid><description>A practical guide to LeetCode 100 covering synchronous recursion, pairwise BFS validation, structural equivalence, and runnable multi-language implementations.</description></item><item><title>Hot100: Invert Binary Tree (Recursion / BFS ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/226-invert-binary-tree/</link><pubDate>Fri, 06 Mar 2026 17:58:23 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/226-invert-binary-tree/</guid><description>A practical guide to LeetCode 226 covering tree mirroring, recursive left-right swaps, BFS traversal, and engineering mappings.</description></item><item><title>Hot100: Maximum Depth of Binary Tree (DFS / BFS ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/104-maximum-depth-of-binary-tree/</link><pubDate>Fri, 06 Mar 2026 17:58:22 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/104-maximum-depth-of-binary-tree/</guid><description>A practical guide to LeetCode 104 covering the depth definition, recursive DFS, level-order BFS, engineering mappings, and runnable multi-language implementations.</description></item><item><title>Hot100: Binary Tree Inorder Traversal (Recursion / Stack ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/94-binary-tree-inorder-traversal/</link><pubDate>Fri, 06 Mar 2026 17:58:21 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/binary-tree/94-binary-tree-inorder-traversal/</guid><description>A practical guide to LeetCode 94 covering left-root-right traversal, recursion, explicit stacks, engineering mappings, and runnable multi-language implementations.</description></item><item><title>Hot100: Sort List Linked-List Merge Sort ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/148-sort-list/</link><pubDate>Tue, 10 Feb 2026 17:07:38 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/148-sort-list/</guid><description>Sort a singly linked list in O(n log n) time using split + recursive merge sort. This guide explains derivation, invariants, engineering mappings, and runnable multi-language implementations.</description></item><item><title>Hot100: Merge K Sorted Lists Divide-and-Conquer O(N log k) ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/23-merge-k-sorted-lists/</link><pubDate>Tue, 10 Feb 2026 17:05:53 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/23-merge-k-sorted-lists/</guid><description>Upgrade from LeetCode 21 to k-way merge: derive why sequential merge degrades, then use divide-and-conquer to reach O(N log k), with heap comparison and runnable multi-language implementations.</description></item><item><title>Hot100: Linked List Cycle II Floyd Detection + Entry Localization ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/142-linked-list-cycle-ii/</link><pubDate>Tue, 10 Feb 2026 10:47:56 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/142-linked-list-cycle-ii/</guid><description>Return the first node where a singly linked list enters a cycle without modifying the list: use Floyd fast/slow pointers to detect a meeting point, then reset one pointer to head and move both one step to localize the entry in O(n) time and O(1) space.</description></item><item><title>Hot100: Merge Two Sorted Lists Sentinel Two-Pointer Merge ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/21-merge-two-sorted-lists/</link><pubDate>Tue, 10 Feb 2026 10:47:02 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/21-merge-two-sorted-lists/</guid><description>Merge two sorted linked lists in O(m+n) with sentinel node and two pointers, with iterative and recursive comparison, engineering mapping, and runnable multi-language implementations.</description></item><item><title>Hot100: First Missing Positive In-Place Index Placement ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/41-first-missing-positive/</link><pubDate>Tue, 10 Feb 2026 10:25:53 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/41-first-missing-positive/</guid><description>Find the first missing positive in O(n) time and O(1) extra space using in-place index placement (value x should be placed at index x-1), with engineering mapping, pitfalls, and runnable multi-language implementations.</description></item><item><title>Hot100: Reverse Nodes in k-Group Group-Wise In-Place ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/25-reverse-nodes-in-k-group/</link><pubDate>Tue, 10 Feb 2026 10:25:53 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/25-reverse-nodes-in-k-group/</guid><description>Reverse a linked list in groups of k nodes in-place, leaving the last group unchanged if its size is smaller than k. This guide presents a dummy-node + kth-scan + in-place reversal template in O(n) time and O(1) extra space.</description></item><item><title>Hot100: Reorder List In-Place Split-Reverse-Merge ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/143-reorder-list/</link><pubDate>Tue, 10 Feb 2026 09:57:31 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/143-reorder-list/</guid><description>Reorder a linked list to L0-&amp;gt;Ln-&amp;gt;L1-&amp;gt;Ln-1... in O(n) time and O(1) extra space using split, reverse, and alternating merge, with derivation, pitfalls, and runnable multi-language implementations.</description></item><item><title>Hot100: Reverse Linked List II Dummy Node + Head-Insertion ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/92-reverse-linked-list-ii/</link><pubDate>Tue, 10 Feb 2026 09:56:14 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/92-reverse-linked-list-ii/</guid><description>Reverse only the interval [left, right] in a singly linked list using a dummy node and in-place head insertion. O(n) time, O(1) extra space, with derivation, pitfalls, and runnable multi-language implementations.</description></item><item><title>Hot100: Linked List Cycle Floyd Fast/Slow Pointer ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/141-linked-list-cycle/</link><pubDate>Tue, 10 Feb 2026 08:55:58 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/141-linked-list-cycle/</guid><description>Detect whether a singly linked list has a cycle using Floyd fast/slow pointers in O(n) time and O(1) extra space, with proof intuition, pitfalls, engineering mapping, and runnable multi-language implementations.</description></item><item><title>Hot100: Palindrome Linked List Fast/Slow + Reverse Second Half O(1) Space ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/234-palindrome-linked-list/</link><pubDate>Mon, 09 Feb 2026 17:38:32 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/234-palindrome-linked-list/</guid><description>Check whether a singly linked list is a palindrome in O(n) time and O(1) extra space: find middle with fast/slow pointers, reverse second half, compare, then restore list structure.</description></item><item><title>Hot100: Reverse Linked List Three-Pointer Iterative/Recursive ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/206-reverse-linked-list/</link><pubDate>Mon, 09 Feb 2026 17:27:59 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/206-reverse-linked-list/</guid><description>Reverse a singly linked list in O(n) time and O(1) extra space with the three-pointer iterative template, with recursive comparison, engineering mapping, and runnable multi-language implementations.</description></item><item><title>Hot100: Subarray Sum Equals K Prefix Sum + Hash Map ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/560-subarray-sum-equals-k/</link><pubDate>Mon, 09 Feb 2026 13:19:45 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/560-subarray-sum-equals-k/</guid><description>Count subarrays whose sum equals k in O(n) using prefix sum and frequency hash map, with engineering scenarios, pitfalls, and runnable multi-language implementations.</description></item><item><title>Hot100: Intersection of Two Linked Lists Two-Pointer Switch-Head O(1) Space ACERS Guide</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/160-intersection-of-two-linked-lists/</link><pubDate>Mon, 09 Feb 2026 09:26:37 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/160-intersection-of-two-linked-lists/</guid><description>Find the intersection node of two singly linked lists without modifying structure: two pointers switching heads synchronize in O(m+n) time and O(1) extra space, with derivation, engineering mapping, and multi-language implementations.</description></item><item><title>Hot100: Spiral Matrix (Boundary Shrinking Simulation ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/54-spiral-matrix/</link><pubDate>Tue, 03 Feb 2026 10:01:50 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/54-spiral-matrix/</guid><description>Traverse a matrix in clockwise spiral order in O(mn) using boundary shrinking. Includes engineering scenarios, pitfalls, and multi-language implementations.</description></item><item><title>LeetCode 42: How Much Rain Water Can an Elevation Map Hold?</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/42-trapping-rain-water/</link><pubDate>Sat, 24 Jan 2026 10:40:53 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/42-trapping-rain-water/</guid><description>Start with one position, derive boundary arrays and an O(1)-space two-pointer solution, then connect the same boundary model to a monotonic stack.</description></item><item><title>Hot100: Maximum Subarray (Kadane O(n) ACERS Guide)</title><link>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/53-maximum-subarray/</link><pubDate>Fri, 23 Jan 2026 13:21:02 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/alg/leetcode/hot100/53-maximum-subarray/</guid><description>Use Kadane&amp;#39;s algorithm to compute the maximum subarray sum in O(n). Includes engineering scenarios, pitfalls, and multi-language implementations.</description></item></channel></rss>