CSCA48H3 Lecture Notes - Lecture 12: Binary Heap, Binary Tree, Data Structure

99 views3 pages

Document Summary

Csca48 - lecture 12 - compact binary trees + recursion. Data structure commonly used to implement priority queues. A heap is a (binary) tree-based data structure where each node contains a key, and the. If a node a is the parent of a node b, then node a"s key is less than or equal to node b"s tree satisfies the heap property : key. What we describe above is also called a min heap. We can similarly define a max heap by using "greater than or equal to" instead of "less. Note: the word heap has another meaning in computer science. It refers to the part of memory where dynamically allocated objects reside than or equal to" when defining the heap property. A tree is compact if every depth level is full (contains the maximum number of nodes), except possibly the deepest level, in which all its nodes appear as far to the left as possible.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents