What do we mean by length of binary tree - number of nodes, or height of tree?
Thank you
What do we mean by length of binary tree - number of nodes, or height of tree?
Thank you
It is not a term I have seen used to describe the properties of a binary tree. I would guess someone using it would be referring to the depth.
I would personally think of 'length' as the height (depth), not the size (# of nodes) of the tree, but this is quite a contextual question.
Typically, 'length' refers to the number of items in the underlying data structure. The height of the tree would be its 'depth'