A full binary tree with n leaves contains how many nodes
Answers
Answered by
0
Some binary tree implementations store data only at the
leaf nodes,
using the internal nodes to provide structure
to the tree.
By definition, a leaf node does not need to store pointers to its
(empty) children.
More generally, binary tree implementations might require some amount
of space for internal nodes, and a different amount for leaf nodes.
Thus, to compute the space required by such implementations, it is
useful to know the minimum and maximum fraction of the nodes that are
leaves in a tree containing n internal nodes.
Similar questions
English,
7 months ago
Accountancy,
7 months ago
Math,
7 months ago
Science,
1 year ago
Science,
1 year ago