1.

A node of the weight balanced tree has(a) key, left and right pointers, size(b) key, value(c) key, size(d) keyThe doubt is from Weight Balanced Tree topic in section Binary Trees of Data Structures & Algorithms IThis question was addressed to me in an online interview.

Answer» CORRECT option is (a) key, left and right pointers, size

Best explanation: As a weight balanced tree stores HEIGHT of the subtrees, we need to use size as an ADDITIONAL attribute to every node. ALSO value(for MAPPINGS) may be an optional attribute.


Discussion

No Comment Found

Related InterviewSolutions