V2EX  ›  英汉词典
Enqueued related words: Sift-Down, Sift-Up, Build-Heap

Heapify

释义 Definition

heapify(动词):把一个数组/树形结构调整为满足堆(heap)性质的过程(如最大堆或最小堆),常用于堆排序或优先队列的构建与维护。也可指对某个节点执行“下沉/上浮”操作以恢复堆结构。

发音 Pronunciation

/ˈhiːpɪfaɪ/

例句 Examples

We need to heapify the array before sorting.
在排序之前,我们需要先把这个数组调整成堆。

After replacing the root, the algorithm heapifies the tree in O(log n) time to restore the min-heap property.
在替换根节点之后,算法会在 O(log n) 时间内对这棵树进行 heapify,以恢复最小堆的性质。

词源 Etymology

heapify 由名词 heap(堆) 加动词后缀 -ify(使成为……) 构成,字面意思是“使之成为堆(结构)”。在计算机科学中,“heap”专指满足特定父子节点大小规律的二叉堆数据结构,因此 heapify 就是“把结构调整到符合堆规则”的操作。

相关词 Related Words

文学与作品 Literary Works

  • Introduction to Algorithms(Cormen, Leiserson, Rivest, Stein,常称 CLRS):在堆章节中系统讲解 heapify / max-heapify 的概念与复杂度分析。
  • Algorithms(Robert Sedgewick & Kevin Wayne):在优先队列与堆排序相关内容中使用并解释 heapify
  • The Art of Computer Programming, Vol. 3: Sorting and Searching(Donald E. Knuth):在排序与堆相关讨论中涉及堆的构建与调整(常以等价操作描述 heapify 思想)。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2462 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 06:43 · PVG 14:43 · LAX 22:43 · JFK 01:43
♥ Do have faith in what you're doing.