<?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>Monotonic Stack on Jeanphilo Blog</title><link>https://shio-chan-dev.github.io/jeanblog/tags/monotonic-stack/</link><description>Recent content in Monotonic Stack on Jeanphilo Blog</description><generator>Hugo -- 0.165.0</generator><language>en-us</language><lastBuildDate>Mon, 20 Jul 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://shio-chan-dev.github.io/jeanblog/tags/monotonic-stack/index.xml" rel="self" type="application/rss+xml"/><item><title>LeetCode 503: Where Does the Right Side End in a Circular Array?</title><link>https://shio-chan-dev.github.io/jeanblog/alg/leetcode/503-next-greater-element-ii/</link><pubDate>Mon, 20 Jul 2026 00:00:00 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/alg/leetcode/503-next-greater-element-ii/</guid><description>Start from the exact circular next-greater query, build a verifiable scan, then derive a linear monotonic-stack solution that pushes each original index once.</description></item><item><title>LeetCode 84: Which Bar Limits a Contiguous Rectangle?</title><link>https://shio-chan-dev.github.io/jeanblog/alg/leetcode/hot100/84-largest-rectangle-in-histogram/</link><pubDate>Mon, 20 Jul 2026 00:00:00 +0800</pubDate><guid>https://shio-chan-dev.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://shio-chan-dev.github.io/jeanblog/alg/leetcode/hot100/739-daily-temperatures/</link><pubDate>Wed, 15 Jul 2026 00:00:00 +0800</pubDate><guid>https://shio-chan-dev.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 42: How Much Rain Water Can an Elevation Map Hold?</title><link>https://shio-chan-dev.github.io/jeanblog/alg/leetcode/hot100/42-trapping-rain-water/</link><pubDate>Sat, 24 Jan 2026 10:40:53 +0800</pubDate><guid>https://shio-chan-dev.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></channel></rss>