Question: 1) Recall from Definition 5.16 that we defined a binary tree as an empty tree, denoted by null; or a root node x , a
1) Recall from Definition 5.16 that we defined abinary tree as
- an empty tree, denoted by null; or
- aroot node x, aleft subtree T, and aright subtree Tr, wherex is an arbitrary value andT andTr are both binary trees.
A heap is a binary tree where each node stores a priority, and in which every node satisfies the heap property:the priority of a node u must be greater than or equal to the priorities of the roots of both of u's subtrees. (The restriction only applies for a subtree that is not null.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
