Monday, 24 December 2012

What is Binary Tree?


By on 02:08

Binary Tree in data structure are defined as those tree who's node have 0,1,2 children(s).As we know that general trees are made up of node,root etc.So binary tree also contains root,node,left pointer and the right pointer.In binary tree,tree consist node are called as root node,left and right node are called as Sub-tree.In this tree the degree of each  node is less than 2(<2).This tree deals in C ++,Java code etc.




Types of binary tree:-

1)Complete binary Tree:-Complete binary tree are those tree whose degree of every node is 2 or o.

No. of leaf node=2^level nodes.

Example:-




2)Almost complete Binary Tree:-In complete binary tree all the leaf are at the same level but in this type of binary tree all the leaf are in the bottom level.




3)Strictly binary tree:-Strictly binary tree are those tree whose degree of every node is 0 or 2.

Total no. of node=(2n-1).
where n=no. of leaf node.






If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...