recategorized by
975 views

3 Answers

2 votes
2 votes
Height and level of a tree are equal.

but height and level of a node are not equal because...

the height is calculated by traversing from leaf to the given node

level is calculated from traversal from root to the given node

that means the height of leaves is 0 and the level of root is 0.
0 votes
0 votes
Height=level+1 because

level count will start with 0 .

height count will start with 1.

Level of the root is 0.

Height of the root is 1.

Related questions

2 votes
2 votes
1 answer
1
Sanjay Sharma asked Nov 23, 2016
1,371 views
what are the complexities of different trees like BST,AVL,HEAP,B-tree etc for insertion updation deletion for all 3 cases 1)best 2)avg 3)worst
3 votes
3 votes
0 answers
2
iarnav asked Jan 7, 2018
1,010 views
Consider a binary tree T that has 150 leaf nodes. Then the number of TOTAL nodes in T that have exactly two children are ______.
2 votes
2 votes
5 answers
4
Hardik Vagadia asked Nov 13, 2017
920 views
A 4-ary tree,i.e. each node has either 0 or 4 children tree has 20 leaf nodes. Then the total number of nodes in the tree are ____.