DATA STRUCTURES



Admission Enquiry Form

Tree Data Structure

A tree data structure is a non-linear data structure in which elements are arranged in hierarchical form.



Some important terms with respect to tree.

  1. Root − The node at the top of the tree is called root. There is only one root per tree.

  2. Parent − Any node except the root node has one edge upward to a node called parent.

  3. Child − The node below a given node connected by its edge downward is called its child node.

  4. Leaf − The node which does not have any child node is called the leaf node.

  5. Siblings − The nodes that have the same parent are known as siblings.

  6. Subtree − Subtree represents the descendants of a node.

  7. Traversing − Traversing means passing through nodes in a specific order.

  8. Path − Path refers to the sequence of nodes along the edges of a tree.

  9. Levels − Level of a node represents the generation of a node. If the root node is at level 0, then its next child node is at level 1, its grandchild is at level 2, and so on.

  10. keys − Key represents a value of a node based on which a search operation is to be carried out for a node.

  11. Edge - A link connecting one node to the second node is known as edge.

  12. Height of node - The height of node can be defined as the longest path from the particular node to the leaf node.

  13. Depth of node - The depth of node x can be defined as the length of the path from the root to the node x.