Question: I know that a SortedSet in C# is a Red-Black tree. My problem involves adding an element to the SortedSet and getting the lowest element greater than the one just inserted. This should take time O(log n). Yet, I ...
Question: In current C++ STL, where are red-black tree used? (I assume map and set do?) Is the red-black tree used 2-3 tree (ie only left or right child can be red) or 2-3-4 tree (ie both left and right ...
Question: I was going through an article in geeksforgeeks on how to implement dictionary using balanced BST and found this line: If we store keys in binary search tree, a well balanced BST will need time proportional to M * ...
Question: If we have a node in a red-black tree with a black height of 3, what is the maximum height allowed for the node? Answer: A red black tree has a max height of 2 * log(n+1) so if ...