AVL TREE vs RB TREE
This blog refers to tree which is a data structure, made up of nodes. Where each node stores a value and there is also some type of hierarchical relationship between the nodes such that one node is the parent of its children. The trees are typically drawn with circles and lines also. The circles represent the nodes of the tree. The lines represent the relationships between a parent node and its child node. Both AVL and RB trees fall under Self-Balancing Binary Search Trees. These are height-balanced binary search trees that automatically keep the height as small as possible when insertion and deletion operations are performed on trees. A Binary Search Tree (BST) is a Binary Tree that conforms to the following conditions: ⦁ All nodes stored in the left subtree of a node must have values that are less than that node. ⦁ All nodes stored in the right subtree of a node must have values that are greater than that node. AVL Tree : AVL tree (Adelson-Velsky and Landis) is a self-balancin...