Differences between binary search tree and avl tree.
Answers
Answered by
29
❤Hello!!❤
⤵⤵⤵⤵⤵⤵⤵⤵⤵⤵⤵⤵
The only difference between AVL Tree and Binary Search Tree is that AVL Tree is a self-balancing tree BST. Balanced Tree means - for each node i in the tree, the difference between heights of its left and right child is 0 or 1, i.e - abs(height( left(i)) - height(right(i))) < 2.
⤴⤴⤴⤴⤴⤴⤴⤴⤴⤴⤴⤴⤴
✌HOPE it helps to you!!!✌
Answered by
6
Answer:
All nodes must have at most two children. (Binary tree) In a binary search tree, all the nodes in the left sub-tree have a value less than that of the root node. Correspondingly, all the nodes in the right sub-tree have a value either equal to or greater than the root node.
Similar questions