You are on page 1of 1

Data structures

Tree
Properties of binary tree
Max no of nodes If height given is 2h+1-1
Min no of nodes is h+1
n+1=2h+1
take log
log2(n+1)-1=h
n=h+1
n-1=h
no of nodes in a particular level is 2i
no of leaf nodes is no of node having two children +1\
no of null nodes is no of nodes +1
application of tree
1. expression tree _ operand at leaf node and operator at internode

You might also like