Tree in Data structure
A tree is a nonlinear data structure that represents the hierarchical relationship among its elements. What is a tree in Data structure? A tree is a finite set of nodes such that there is always a distinguished node called a root. and other nodes are partitioned into subtrees. Types of Trees in data structures but…