V2EX  ›  英汉词典

Monotone Queue

释义 Definition

单调队列(单调双端队列):一种在队列(通常用 deque 实现)中保持元素(或其对应值)单调递增/递减的技巧,用于在均摊 \(O(1)\) 时间内维护区间最值等信息,常见于滑动窗口最大/最小值与某些 DP 优化

发音 Pronunciation (IPA)

/ˈmɑːnətoʊn kjuː/

例句 Examples

Use a monotone queue to get the maximum in each sliding window.
用单调队列来求每个滑动窗口里的最大值。

By maintaining indices in a decreasing monotone queue, we can update the window maximum in amortized \(O(1)\) time as the window moves.
通过在递减单调队列中维护下标,窗口移动时就能以均摊 \(O(1)\) 的时间更新窗口最大值。

词源 Etymology

monotone 来自希腊语词根 mono-(“单一”)+ tonos(“音调/张力”),引申为“单调的、单一方向变化的”。queue 来自法语 queue(“尾巴、队列”)。组合成 monotone queue,在算法语境中指“队列内部保持单调性”的数据结构技巧(通常用双端队列实现)。

相关词 Related Words

文学/经典资料中的出现 Literary / Notable Works

  • Competitive Programming 3(Steven Halim 等):以“滑动窗口最值”等经典题型介绍单调队列思路
  • Competitive Programming 4(Steven & Felix Halim):在数据结构与区间维护相关章节常提及单调队列技巧
  • CP-Algorithms(cp-algorithms.com):“Sliding Window Minimum/Maximum(单调队列)”条目中系统讲解与代码示例
  • USACO Guide:在“Two Pointers / Sliding Window”与相关提高模块中常用单调队列作为标准解法之一
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1159 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 18:00 · PVG 02:00 · LAX 11:00 · JFK 14:00
♥ Do have faith in what you're doing.