Tree: Non-Linear Data Structure in which data is organized in a hierarchical manner. It is very fast for information retrieval and searching operations.
Important Terminology of a Binary Tree.
Edges: Lines connecting two nodes, it is also known as branches.
Parent Node: The immediate predecessor of a node (node that comes just before a node).
Child Node: The immediate successors of a node (node that comes just next in line).
Root Node: The node that doesn't have any parent node.
Leaf Node: The node that doesn't have any child node. The node other than the leaf node is known as a non-leaf or terminal node.
Level: Distance of that node from the root.
Height: Total number of level, depth of the tree, Level+1=Height
Siblings: All nodes having the same parent. All siblings are at the same level but it is not necessary that nodes at the same level are siblings.
Path: It is a way to reach a node from any other node. In a tree, there is only one path possible between any two nodes. Path length = Number of Edges on the path.
Degree: The number of children or subtrees connected to a node.
Forest: The subtrees we get after removing the root of the main tree is collectively called as Forest (also known as a set of disjoint trees).




Trends is an amazing magazine Blogger theme that is easy to customize and change to fit your needs.