2-3 Tree
AVL Tree: https://www.youtube.com/watch?v=vQptSYake4E&t=418s Red Black Tree https://www.youtube.com/watch?v=9ubIKipLpRU&t=609s In binary search trees we have seen the average-case time for operations like search/insert/delete is O(log N) and the worst-case time is O(N) where N is the number of nodes in the tree. Like other Trees include AVL trees, Red Black Tree, B tree, 2-3 Tree is also a height balanced tree. The time complexity of search/insert/delete is O(log N) . A 2-3 tree is a B-tree of order 3. Properties of 2-3 tree: Nodes with two children are called 2-nodes. The 2-nodes have one data value and two children Nodes with three children are called 3-nodes. The 3-nodes have two data values and three children. Data is stored in sorted order. It is a balanced tree. All the leaf nodes are at same level. Each node can either be leaf, 2 node, or 3 node. Always insertion is done at leaf.
AVL Tree: https://www.youtube.com/watch?v=vQptSYake4E&t=418s Red Black Tree https://www.youtube.com/watch?v=9ubIKipLpRU&t=609s In binary search trees we have seen the average-case time for operations like search/insert/delete is O(log N) and the worst-case time is O(N) where N is the number of nodes in the tree. Like other Trees include AVL trees, Red Black Tree, B tree, 2-3 Tree is also a height balanced tree. The time complexity of search/insert/delete is O(log N) . A 2-3 tree is a B-tree of order 3. Properties of 2-3 tree: Nodes with two children are called 2-nodes. The 2-nodes have one data value and two children Nodes with three children are called 3-nodes. The 3-nodes have two data values and three children. Data is stored in sorted order. It is a balanced tree. All the leaf nodes are at same level. Each node can either be leaf, 2 node, or 3 node. Always insertion is done at leaf.