B-Trees are version of 2-3 trees, which are self-balancing. They are used to improve Disk reads and have a complexity of O(log(n)), for every tree operations.The number of Childrens/Keys a particular node has, is determined by the Branching Factor/Degree of that tree. Btrees will always have sorted keys.
- Branching Factor(B) / Degree (D): If B = n, n <= Children per Node < 2(n), n-1 <= Keys per Node < 2(n) - 1
Properties
- Worst/Average case performance for all operations O(log n)
- Space complexity O(n)
Sources to read:
An AVL Tree is a self-balancing binary search tree. The heights of any two sibling nodes must differ by at most one; the tree may rebalance itself after insertion or deletion to uphold this property.
Properties
- Worst/Average time complexity for basic operations: O(log n)
- Worst/Average space complexity: O(n)
Sources to read: