Binary Tree
Binary Tree
In this tutorial, you will learn about binary tree and its different types. Also,
you will find working examples of binary tree in C, C++, Java and Python.
A binary tree is a tree data structure in which each parent node can have at
most two children. Each node of a binary tree consists of three items:
data item
Binary
Tree
A full Binary tree is a special type of binary tree in which every parent
node/internal node has either two or no children.
Full Binary Tree
To learn more, please visit full binary tree.
2. Perfect Binary Tree
A perfect binary tree is a type of binary tree in which every internal node
has exactly two child nodes and all the leaf nodes are at the same level.
A complete binary tree is just like a full binary tree, but with two major
differences
A degenerate or pathological tree is the tree having a single child either left
or right.
It is a type of binary tree in which the difference between the height of the
left and the right subtree for each node is either 0 or 1.