1.

The balance factor of a node in a binary tree is defined as _____(a) addition of heights of left and right subtrees(b) height of right subtree minus height of left subtree(c) height of left subtree minus height of right subtree(d) height of right subtree minus oneOrigin of the question is Binary Trees in section Binary Trees of Data Structures & Algorithms II got this question in homework.

Answer»

The correct choice is (C) height of LEFT SUBTREE minus height of right subtree

Explanation: For a node in a binary tree, the difference between the HEIGHTS of its left subtree and right subtree is known as BALANCE factor of the node.



Discussion

No Comment Found

Related InterviewSolutions