Question: A full binary tree is said to have the heap or max heap property if the value stored in a parent node is always bigger

A full binary tree is said to have the heap or max heap property if the value stored in a parent node is always bigger than or equal to the values stored in any of its children. We will use the notation v(p)
to denote the value stored at node p
, which means that a full binary tree T
has property heap if, whenever node c
is a child of node p
, it follows that v(p)>=v(c)
.
Exam Image
Does the full binary tree above have the heap property?
Yes! This tree has property heap! (Heap, Heap Hurray!)
No! This tree does not have property heap. :(

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!