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 vp
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 vpvc
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
