Question: Advanced data structures and algorithms Question 1 (30 POINTS): Assume we implement heap using s-children per node, rather than two. 1A) (15 POINTS) Extract a

Advanced data structures and algorithms

Advanced data structures and algorithms Question 1 (30 POINTS): Assume we implement

Question 1 (30 POINTS): Assume we implement heap using s-children per node, rather than two. 1A) (15 POINTS) Extract a formula to compute the index of the parent node for a given node i ie. PARENT(i). Please show your work. 1.B.) (15 POINTS) Extract a formula to compute the index of the kt child node for a given node i, i.e. CHILD(i, k). Please show your work. Question 2 (15 POINTS): Given an array A- 22, 16, 13, 5, 12, 9, 0, 4, 6, 11) check whether this array preserves max-heap property. Please show your work

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!