Course Solutions Uncategorized (Solved) : Complete Tree Stored Array 0 Unused Root 1 Following Refer Parent Left Child Right Child Q35784139 . . . .

(Solved) : Complete Tree Stored Array 0 Unused Root 1 Following Refer Parent Left Child Right Child Q35784139 . . . .

 

A complete tree is stored in an array a with a[0] unused and theroot in a[1]. Which of the following refer to the parent, to theleft child, and to the right child of the node a[i]?

Parent Left Child Right Child

a) a[2*i] a[i+1] a[i-1]

b)a[i+1] a[i-2] a[i-1]

c) a[i/2] a[2*i] a[2*i+1]

d) a[i-1] a[2*i-1] a[2*i]

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post