Profile photo for Richard Rombouts

The level of a node is its distance (each edge counts as 1) to the root node. So the root node has level 0, its direct children have level 1 etc.

The height of the tree is the level of the node(s) with the longest path to to root. Stated differently, the height is the maximum of all levels.


By making appropriate changes above, it is possible to start with the root as having level 1 instead of 0.

In both cases (when starting with 0 or 1) a child node always has a level that is 1 higher than it’s parent node.

View 1 other answer to this question
About · Careers · Privacy · Terms · Contact · Languages · Your Ad Choices · Press ·
© Quora, Inc. 2025