Binary Tree
Binary Tree is a tree whose element has at most 2 children. Because each elements have at most 2 children, they are usually called left and right child.
A binary tree contains these parts:
- Data
- Pointer to the left child
- Pointer to the right child
These are the characteristics of binary tree:
1. The top node is called a "Root"
2. A line connecting each data is called an "edge"
3. Nodes that comes from the same data is called "Siblings"
4. Nodes that do not have a children is called a "Leaf"
This is an example of a Binary Tree:
A binary tree contains these parts:
- Data
- Pointer to the left child
- Pointer to the right child
These are the characteristics of binary tree:
1. The top node is called a "Root"
2. A line connecting each data is called an "edge"
3. Nodes that comes from the same data is called "Siblings"
4. Nodes that do not have a children is called a "Leaf"
This is an example of a Binary Tree:
Comments
Post a Comment