CSCA48H3 Lecture Notes - Lecture 12: Binary Heap, Binary Tree, Data Structure
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.