A Data Structure that consist of nodes in a parent/child relationship.
- Root Node - The top node of a tree.
- Left branch- The nodes branching to the left of the tree and less than the value of the root node or the parent node.
- Right branch- The nodes branching to the right of the tree and greater than the value of the root node or the parent node.
- Child node- a node directly connected to another node when moving away from the root.
- Parent node- a node that has a child or multiple child node.
- Siblings- a group of child node with the same parent node.
- Leaf node- a node with no child node.
- Edge- The connection between a node and another.
Real Life Application of Binary Trees
Binary Trees Requirements
- A binary tree have each node at most of 2 children.
- Root node Usually have 2 nodes.
- Binary search trees are sorted in particular way.
Binary search trees is sorted by the left being less than the parent node and the right being greater than the parent node.