This proyect have diferents exercises with binay trees. binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. A recursive definition using just set theory notions is that a (non-empty) binary tree is a tuple (L, S, R), where L and R are binary trees or the empty set and S is a singleton set containing the root.
Following are the important terms with respect to tree.
* Path − Path refers to the sequence of nodes along the edges of a tree.
* Root − The node at the top of the tree is called root. There is only one root per tree and one path from the root node to any node.
* Parent − Any node except the root node has one edge upward to a node called parent.
* Child − The node below a given node connected by its edge downward is called its child node.
* Leaf − The node which does not have any child node is called the leaf node.
* Subtree − Subtree represents the descendants of a node.
* Visiting − Visiting refers to checking the value of a node when control is on the node.
* Traversing − Traversing means passing through nodes in a specific order.
* 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.
* keys − Key represents a value of a node based on which a search operation is to be carried out for a node.