Professional Documents
Culture Documents
– It has a root node , which may not have any child nodes (0 child
nodes, NULL tree)
– Root node may have 1 or 2 child nodes . Each such node forms a
binary tree itself
– Number of child nodes can be 0 ,1 ,2.......not more than 2
– There is a unique path from the root to every other node
E.g. :-
E.g.:-
E.g.:-
A binary tree is a complete binary tree (of height h , we take root node
as 0 ) if and only if :-
– If j,k are nodes in level h-1, then j has more child nodes than k if
and only if j is to the left of k , i.e. the last level (h) can be missing
leaf nodes, however the ones present must be shifted to the left
Inorder Traversal :-
Step 1 : Start from the root node .
Step 2 : Now go to the leftmost node from the root node in the
left subtree.
C F
E G N K
M
I
Preorder Traversal :- A C E G I F N K M
Inorder Traversal :- ECIGANKFM
Postorder Traversal :- E I G C N M K F A