Tree is a non-linear data structure which has Root node, Leaf node.
It means nodes are in the form of levels which are nothing but levels. The top most node is called as Root node and the nodes without any child nodes are know to be leaf nodes.
a -- >Root node
/ \
b c -- >child node
/ \ / \
d e f g -- >child nodes
Why to Use Trees.?
- If you want to insert and delete data in hierarchical form go for trees.
- More efficient
- Good performance
- Can insert/delete faster than LinkedList
- Make information easy to search
Types of Tree data structures:
- Binary tree
- Binary search tree
- AVL tree
- Red-black tree
- B tree
- Splay tree
- K-D tree
- B+ tree.... etc.
Click below or More Tree options:
No comments:
Post a Comment