Tree data structure explained with simple example
A tree is an abstract data type which stores data hierarchically. The top element is known as “Root”. Each node in a tree has a parent node and zero or more children nodes except that Root node which has only children nodes but no parent node.
For eg: a tree can be shown as follows: