1.

What is the condition for a tree to be weight balanced. where a is factor and n is a node?

A. weight[n.left] >= a*weight[n] and weight[n.right] >= a*weight[n].
B. weight[n.left] >= a*weight[n.right] and weight[n.right] >= a*weight[n].
C. weight[n.left] >= a*weight[n.left] and weight[n.right] >= a*weight[n].
D. weight[n] is a non zero
Answer» B. weight[n.left] >= a*weight[n.right] and weight[n.right] >= a*weight[n].


Discussion

No Comment Found