tree-types
Types of Trees in Data Structure based on the number of children:
1. Binary Tree
Each element in a binary tree can have only 2 children.
Types of Binary Tree:
Binary Tree consists of following types based on the number of children:
Full Binary Tree
Degenerate Binary Tree
On the basis of completion of levels, the binary tree can be divided into following types:
Complete Binary Tree
Perfect Binary Tree
Balanced Binary Tree
2. Ternary Tree
Each node has at most three child nodes, usually distinguished as “left”, “mid” and “right”.
3. N-ary Tree (Generic Tree)
Many children at every node.
The number of nodes for each node is not known in advance.
Special Types of Trees in Data Structure based on the nodes’ values:
1. Binary Search Tree
Properties:
Left node is lesser than root node
Right node is greater than the root node
The left and right subtree each must also be a binary search tree
2. AVL Tree
Properties:
AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees for any node cannot be more than one.
3. Red-Black Tree
4. B-Tree
5. B+ Tree
6. Segment Tree
Last updated