DATA STRUCTURES



Admission Enquiry Form

Types of Trees in Data Structure

Following are the types of trees in a data structure:



1. Genaral Tree.

General Tree : In General tree there is no limitation is placed on the tree hierarchy.It is a tree in which each node can have either zero or many child nodes or we can say infinite numbers of children. It can not be empty.
The topmost node of a general tree is called the root node. There are many subtrees in a general tree.The tree is the super-set of all other trees.





2. Binary Tree

Binary Tree: The binary tree is the kind of tree in which almost two children can be found for each parent.Here, binary name itself suggests that 'two'; therefore, each node can have either 0, 1 or 2 children. 
The children are known as the left child and right child. This is more popular tree than the other trees.


In the above figure (A) is an empty binary tree as it does not contain any node.

So, Binary tree may be empty and can have almost two children but General tree can never be empty and each node can have any number of children.



3. Binary Search Tree

Binary Search Tree (BST): Binary Search Tree (BST) is a binary tree extension with some restrictions.
In a binary search tree, the value of all the nodes of the left child node is less than the value of the parent node. Similarly, value of all the nodes of the right child is greater than or equal to the value of the parent node.