全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Binary heap, heap property?

又称: binary heap · heap property

Definition 18.4 University Computer Science — Year 1 · 第 18 章 — Heaps and Priority Queues

A binary heap is a complete binary tree stored in an array, with the heap property: the key of every node is at most the keys of its children (a min-heap), or at least them (a max-heap).

The min-heap built by , as a tree and as the array that stores it. Every key is at most its children’s keys; the arrows are computed from the indices, not stored.
The min-heap built by Output 18.2, as a tree and as the array that stores it. Every key is at most its children’s keys; the arrows are computed from the indices, not stored.
在原文中阅读 →