# The balance factor of a node in a binary tree is defined as _____

Category: QuestionsThe balance factor of a node in a binary tree is defined as _____
Editor">Editor Staff asked 5 months ago

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 one

Origin of the question is Binary Trees in section Binary Trees of Data Structures & Algorithms I

I got this question in homework.

Editor">Editor Staff answered 5 months ago

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.

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40701