V2EX  ›  英汉词典

Priority Queue

释义 Definition

优先队列:一种抽象数据类型/数据结构,用于存放元素,并允许按“优先级”取出元素。通常每次取出的是优先级最高(或最低,取决于约定)的元素,而不一定遵循先进先出(FIFO)。常见实现包括二叉堆(heap)等。

发音 Pronunciation (IPA)

/praɪˈɔːrəti kjuː/

例句 Examples

A priority queue always removes the most important item first.
优先队列总是先移除最重要的项目。

In the scheduler, tasks are inserted into a priority queue so that urgent jobs run before background work, even if they arrived later.
在调度器中,任务被插入优先队列,使紧急作业能在后台工作之前运行,即使它们更晚到达。

词源 Etymology

priority 来自拉丁语 prior(“更早的、在前的”),引申为“优先级、重要性顺序”;queue 源于法语 queue(“尾巴”),在英语中表示“队列”。合起来 priority queue 字面意思是“按优先级排列的队列”,强调“按重要性出队”而非按到达顺序。

相关词 Related Words

文学与著作中的用例 Literary Works

  • Introduction to Algorithms(Cormen, Leiserson, Rivest, Stein,常称 CLRS):在堆与优先队列章节中系统讨论其定义、操作与时间复杂度。
  • The Art of Computer Programming, Volume 3: Sorting and Searching(Donald E. Knuth):在相关数据结构与检索主题中涉及基于堆/选择结构的思想,与优先队列密切相关。
  • Algorithms(Robert Sedgewick & Kevin Wayne):在优先队列与堆的章节中给出经典实现与应用示例(如事件模拟、图算法等)。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   739 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 19:13 · PVG 03:13 · LAX 11:13 · JFK 14:13
♥ Do have faith in what you're doing.