answersLogoWhite

0


Best Answer

height and depth of a tree is equal...

but height and depth of a node is not equal because...

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

depth is calculated from traversal from root to the given node.....

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between height and depth of a tree?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Difference between height of a tree and depth of a tree and level of a tree?

Level and height are same, but the depth is the is the maximum distance from any node to root. It is reverse in the case of height.


What is the difference in height between a tree and a shrub?

kilometers


Is there a difference in height between a grey and red squirrel l?

it depends on how high up the tree they are at the time?


What is the measuring difference between height and length?

Both height and length are linear measurements. The units of measure are the same. Height -- not heighth -- is synonymous with altitude, and can be thought of as the distance above the ground, as in the height of a skyscraper or the height of a tall tree (or any tree, for that matter).


What is the difference between strictly binary tree and complete binary tree?

Complete Binary tree: -All leaf nodes are found at the tree depth level -All nodes(non-leaf) have two children Strictly Binary tree: -Nodes can have 0 or 2 children


What is difference between tree and hybrid topology?

no difference,,,tree and hybrid are same.


Depth and Height of Binary tree?

height(node):if node == null:return 0else:max(height(node.L), height(node.R)) + 1/*Function to print level order traversal of tree*/getMaxWidth(tree)maxWdth = 0for i = 1 to height(tree)width = getWidth(tree, i);if(width > maxWdth)maxWdth = widthreturn width/*Function to get width of a given level */getWidth(tree, level)if tree is NULL then return 0;if level is 1, then return 1;else if level greater than 1, thenreturn getWidth(tree->left, level-1) +getWidth(tree->right, level-1);


What is the difference between extended binary tree and complete binary tree?

Complete Binary tree: All leaf nodes are found at the tree depth level and All non-leaf nodes have two children. Extended Binary tree: Nodes can have either 0 or 2 children.


Difference between B-tree and B tree?

b-tree


How can the height of a tree be calculated?

It can easily be measured by using a protractor and measuring the angle between the ground and the top of the tree. You need to know exactly how far you are from the tree. Then you can use trigonometry to calculate the height of the tree. Tan (angle in degrees) = height of tree / distance from tree


What is the difference between tree and forest?

A tree is one tree and a forest is many trees.


Difference between syntax tree and parse tree?

i dont know but i