| 1. |
What is the time complexity to find an element in a red and black tree |
|
Answer» Balance is preserved by painting each node of the tree with one of two colors in a WAY that satisfies certain properties, which collectively constrain how unbalanced the tree can become in the WORST case. When the tree is modified, the new tree is subsequently rearranged and repainted to restore the coloring properties. The properties are designed in such a way that this rearranging and recoloring can be performed efficiently. |
|