Monday, September 19, 2022
HomeWordPress DevelopmentHow is an AVL tree completely different from a B-tree?

How is an AVL tree completely different from a B-tree?


View Dialogue

Enhance Article

Save Article

Like Article

View Dialogue

Enhance Article

Save Article

Like Article

AVL Bushes:

AVL tree is a self-balancing binary search tree by which every node keep an additional issue which is named steadiness issue whose worth is both -1, 0 or 1.

B-Tree:

A B-tree is a self – balancing tree knowledge construction that retains knowledge sorted and permits searches, insertions, and deletions in O(log N)  time.

Distinction between AVL Tree and B-Tree:

S.No.  

                                             AVL Bushes                                                  

                                                           B-Tree                                                         

1

It’s a self-balancing binary search tree It’s a multi-way tree(N – ary tree).

2

Each node accommodates at most 2 youngster nodes On this tree, nodes can have a number of youngster nodes

3

It has a steadiness issue whose worth is both -1, 0, or 1.

Stability issue = (peak of left subtree)-(peak of proper subtree)

or

Stability issue = (peak of proper subtree)-(peak of left subtree)

B-Tree is outlined by the time period minimal diploma ‘t‘. The worth of ‘t‘ relies upon upon disk block measurement.
Each node besides the foundation should comprise not less than t-1 keys. The basis could comprise a minimal of 1 key.

4

AVL tree has a peak of log(N) (The place N is the variety of nodes). B-tree has a peak of log(M*N) (The place ‘M’ is the order of tree and N is the variety of nodes).
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments