Question: Problem 4 (10 marks) Suppose that a max-heap H contains n distinct elements. Suppose that H is stored in a full binary tree T of

 Problem 4 (10 marks) Suppose that a max-heap H contains n

distinct elements. Suppose that H is stored in a full binary tree

Problem 4 (10 marks) Suppose that a max-heap H contains n distinct elements. Suppose that H is stored in a full binary tree T of height h and T has 2h leaves. Consider an clement e that is stored in node u. The parent of u is a node v and the parent of v is the root node. In other words, e is stored in some node on the third level of the heap (if we count levels starting at the root node and the root is on the first level). -What is the smallest possible number of clements d' such that e' > e? -What is the largest possible number of elements e" such that e">e Formulate the answer as the function of h

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!