Tree Data Structure
Tree is non-linear data structure in computer science. that are used to represent data in hierarchical manner. Every data element of tree is called nodes. Top node of tree is called root node of tree. help of this node are possible to access all other nodes.
Tree terminology in computer science
There are following terminology of used to represent tree data structure in computer science.
Node of tree is an data element which are contains key and reference fields. key is indicated data of node and references are used to stored the add of other tree node. there are very similar to linked list node.
Edges of tree is represent connectivity of between two nodes of tree. This are indicates the structure flow of tree. internally edges is a reference fields.
Root node of tree is entry point of tree. Help of this node are possible to travel and access all other tree nodes.
Parent node is an internal node. there are contains at least one child node. Every nodes of tree is represented in form of parent child relation. root node is parent of all other tree node.
Child node of tree is indicates there are at least one parent node. root is not child node of tree because there are no parent of this node. And similarly root is parent node and all other is child node of root.
Leaf node is simplest node of tree. there is are have no child node. or we can say that root to every path of tree is last deepest nodes is called leaf of tree.
Siblings is nodes there are exist in same level and there parent are same.
Left Sub Tree
There is single and combination of node which are connected to left side of any specified node. that is called left sub tree .
Right Sub Tree
there is single and combination of node which are connected to right side of any specified node. that is called right sub tree .
Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.