#IS HEIGHT OF BINARY TREE = MAX LEVEL OF BINARY TREE?

1 messages · Page 1 of 1 (latest)

lapis bramble
#

It is but the numbering is different. The level start from 1 whereas the height starts at 0. So the height is the level + 1.

bronze oak
#

Also, you usually call it DEPTH not HEIGHT

lapis bramble
#

But I the depth is equal to the height in the sense that the max is always the same.

#

Check the image

bronze oak
#

Ok understand how it's being interpreted. Semantics

lapis bramble
#

Yea, it's mostly semantics but that's an easy to lose some points in an exam.

tacit hornet
#

max level of a binary tree if "unbalanced" or "balanced" ?

#

unbalanced could look like a single list, imagine having only left nodes or only right nodes

umbral iron
#

I meant max level as in when the tree is already constructed and maxiumum level one could traverse to ,it wouldnt matter if its balanced or unbalanced