<?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>Stack on Jeanphilo Blog</title><link>https://jeanphilogong.github.io/jeanblog/tags/stack/</link><description>Recent content in Stack on Jeanphilo Blog</description><generator>Hugo -- 0.168.0</generator><language>en-us</language><lastBuildDate>Fri, 21 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jeanphilogong.github.io/jeanblog/tags/stack/index.xml" rel="self" type="application/rss+xml"/><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 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>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: 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></channel></rss>