Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Binary heap, heap property?

Ook bekend als: binary heap · heap property

Definition 18.4 University Computer Science — Year 1 · Hoofdstuk 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.
Lees in het hoofdstuk →