Trees In Data Structures
Tree is a type of non-linear hierarchical data structure in which there is a main node called as the ‘root node’ of the tree and there are left and right nodes of that root node called as the ‘left child’ and the ‘right child’.
Root node always should be one node.
You May Also Like: pm kisan samman nidhi yojana
Root node always should be one node.
Binary Trees
A binary tree T is defined as a finite set of elements, called nodes, such that:- T is empty (called the null tree or empty tree), or
- T contains a distinguished node R, called the root of T, and the remaining nodes of T form an ordered pair of disjoint binary trees T1 and T2.
Leaf Node
A node that has no child is called as ‘leaf node’ of the tree. That means, the last node of the tree is called as the leaf node of that tree.You May Also Like: pm kisan samman nidhi yojana
Post a Comment