BINARY TREE :Each node can have atmost two children.maximum number of nodes possible at any level i is 2i. Binary tree play a vital role in a software application.one of the most application of binary
tree is searching algorithm.
Binary tree is a special data structure used for data storage purpose. Binary tree are used to represent a nonlinear data structure.
First example Quantitative binary tree
complete binary tree: A binary tree is a complete binary tree if all levels are completely filled (except possibly the last level and the last level has nodes as left as possible.
Maximum nodes =2h+1 -1
Minimum nodes =2h
maximum height=log n
second Example Qualitative binary tree
FULL BINARY TREE: Each node have either 0 or 2 children.Each node will contain exactly two children
except leaf node
number of leaf nodes= number of internal node +1.
maximum nodes=2h+1 -1
minimum nodes=2h +1
maximum height =(n-1)/2
Array especially suited for full binary tree
Comments
Leave a comment