<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>单调栈 on Nanxa的小站</title>
    <link>https://nanxa.top/tags/%E5%8D%95%E8%B0%83%E6%A0%88/</link>
    <description>Recent content in 单调栈 on Nanxa的小站</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Mon, 18 May 2026 16:00:00 +0800</lastBuildDate>
    <atom:link href="https://nanxa.top/tags/%E5%8D%95%E8%B0%83%E6%A0%88/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>单调栈全解析（二）：柱状图最大矩形与进阶应用</title>
      <link>https://nanxa.top/post/2026-05-18-monotonic-stack-2/</link>
      <pubDate>Mon, 18 May 2026 16:00:00 +0800</pubDate>
      <guid>https://nanxa.top/post/2026-05-18-monotonic-stack-2/</guid>
      <description>从「下一更大元素」模式翻转为「柱状图最大矩形」模式，理解递增栈在高与宽计算中的关键作用，攻克二维扩展和贪心+单调栈的混合应用（LeetCode 84、85、402），并以全系列复盘对照表收官。</description>
    </item>
    <item>
      <title>单调栈全解析（一）：核心原理与「下一更大元素」</title>
      <link>https://nanxa.top/post/2026-05-18-monotonic-stack-1/</link>
      <pubDate>Mon, 18 May 2026 15:00:00 +0800</pubDate>
      <guid>https://nanxa.top/post/2026-05-18-monotonic-stack-1/</guid>
      <description>从暴力解法的 O(n²) 瓶颈出发，理解单调栈如何利用「剔除无效候选」将复杂度降到 O(n)，掌握递增栈与递减栈的选择规则和通用代码模板，并通过三道经典题（LeetCode 496、503、739）深入下一更大元素模式。</description>
    </item>
  </channel>
</rss>
