Question: JAVA (DATA STRUCTURES) TREE PRACTICE 2) Suppose you implement a binary tree using an array. A node with value, X, is stored in slot 1204
JAVA (DATA STRUCTURES) TREE PRACTICE
2) Suppose you implement a binary tree using an array. A node with value, X, is stored in slot 1204 in the array.
a) Is this node a left child or a right child of its parent?
b) What is the slot (subscript) where this node Xs parent is stored?
c) What slot (subscript) is this node Xs left child stored?
d) What slot (subscript) is this node Xs right child stored?
3) How many nodes are in a full binary tree of height 5?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
