recategorized by
709 views

1 Answer

0 votes
0 votes

Ans: b) 3

A tree is balanced if the difference between heights of left subtree and right subtree is not more than 1.

Balance Factor of node a = | height of left subtree - height of right subtree |
Where |   |  = absolute value function

 

Let "x" be the child of "g".
Balance factor of each node is shown above it in the figure.

Balance factor of the node "a", "b", "c" = 2. These 3 nodes are unbalnced because of the addition of "x" node to "g".

Related questions

0 votes
0 votes
1 answer
1
go_editor asked Mar 26, 2020
337 views
What is the time required to insert an element in a stack with linked implementation?$O \left(\log_{2}n \right)$$O \left(n \right)$$O \left(n \log_{2}n \right)$$O \left(1...
0 votes
0 votes
1 answer
3
0 votes
0 votes
1 answer
4
go_editor asked Mar 26, 2020
1,308 views
The transitive closure of a relation $R$ on set $A$ whose relation matrix $\begin{bmatrix}0 & 1 & 0\\ 0 & 0 & 1 \\ 1 & 0 & 0\end{bmatrix}$ is :$\begin{bmatrix}0 & 1 & 0\\...