Professional Documents
Culture Documents
Trees
Trees
Trees
AVL trees
AVL trees are binary search trees in which the difference between
the height of the left and right subtree is either -1, 0, or +1.
https://www.javatpoint.com/insertion-in-avl-tree
Rotations
Left – Left Rotation
Right – Right Rotation
Right – Left Rotation
Left – Right Rotation
https://
www.tutorialspoint.com/data_structures_a
lgorithms/avl_tree_algorithm.htm
Insertion
Deletion(from right sub tree)
Advantages of AVL Trees
http://
www.btechsmartclass.com/data_structures
/b-trees.html
B + Tree
B+ tree is used to store the records very
efficiently by storing the records in an indexed
manner using the B+ tree indexed structure. Due
to the multi-level indexing, the data accessing
becomes faster and easier
In the B+ tree, keys are the indexes stored in the
internal nodes and records are stored in the leaf
nodes.
Properties
All leaves are at the same level.
The root has at least two children.
Each node except root can have a maximum of
m children and at least m /2 children.
Each node can contain a maximum of m - 1 keys
and a minimum of ⌈m/2⌉ - 1 keys.
https://
www.javatpoint.com/b-tree-vs-bplus-tree
https://
www.youtube.com/watch?v=jpS8BLb8Bg
I
Heaps
A Heap is a special Tree-based data
structure in which the tree is a complete
binary tree
Types
1. Max heap
2. Min heap
Applications
Heap Implemented priority queues are
used in Graph algorithms like
Prim’s Algorithm (minimum spanning
tree) and Dijkstra’s algorithm(shortest
path)
Heap sort
Huffman encoding(data compression)