Question: ( 6 % ) A complete binary tree B containing 1 0 0 nodes ( with indices 1 , 2 , . . . ,

(6%) A complete binary tree B containing 100 nodes (with indices 1,2,...,100) is stored in an one-dimension array. Let node i be in position i of the array (array[0] is empty).
A. What is the height of tree B?
(2%)
B. What is the index of the parent of array[71]?
(2%)
C. How many nodes are leaf nodes?
(2%)
( 6 % ) A complete binary tree B containing 1 0 0

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 Programming Questions!