Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Binary heap, heap property?

Dikenal juga sebagai: binary heap · heap property

Definition 18.4 University Computer Science — Year 1 · Bab 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.
Baca dalam konteks →