2. 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.
AVL trees are also called a self-balancing binary search tree.
These trees help to maintain the logarithmic search time. It is
named after its inventors (AVL) Adelson, Velsky, and Landis.
Balance Factor = (Height of Left Subtree - Height of Right
Subtree)
https://www.javatpoint.com/insertion-in-avl-tree
3. Rotations
Left – Left Rotation
Right – Right Rotation
Right – Left Rotation
Left – Right Rotation
https://www.tutorialspoint.com/data_str
uctures_algorithms/avl_tree_algorithm
.htm
6. Advantages of AVL Trees
The height of the AVL tree is always
balanced. The height never grows
beyond log N, where N is the total
number of nodes in the tree.
It gives better search time complexity
when compared to simple Binary
Search trees.
AVL trees have self-balancing
capabilities.
7. B Tree
B Trees is similar to that in Binary
search tree
B-Tree is a self-balanced search tree
in which every node contains multiple
keys and has more than two children.
Operations
Insertion
Deletion
Search
8. Properties
All leaves are at the same level.
A B-Tree is defined by the term minimum degree ‘t’. The
value of t depends upon disk block size.
Every node except root must contain at least (ceiling)([t-1]/2)
keys. The root may contain minimum 1 key.
All nodes (including root) may contain at most t – 1 keys.
Number of children of a node is equal to the number of keys
in it plus 1.
All keys of a node are sorted in increasing order. The child
between two keys k1 and k2 contains all keys in the range
from k1 and k2.
B-Tree grows and shrinks from the root which is unlike Binary
Search Tree. Binary Search Trees grow downward and also
shrink from downward.
Like other balanced Binary Search Trees, time complexity to
search, insert and delete is O(log n).
Insertion of a Node in B-Tree happens only at Leaf Node
10. 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.
11. 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.