red-black tree
A red-black tree is a self-balancing binary search tree with additional properties that ensure its height is always logarithmic. It achieves this balance by using colored nodes (red and black) and following certain rules during insertion and deletion operations. The red-black tree ensures that no two adjacent nodes are red and that every path from the root to a leaf has the same number of black nodes, resulting in a guaranteed worst-case time complexity of O(log n) for search, insert, and delete operations.
Requires login.