data-structuresred-black-tree

When is a red-black tree left leaning?


When is a red-black tree left leaning ? Does it just mean that on the letf side from the root are more nodes then on the right side?

I cant really grasp the definition what left leaning really means somewehre I also read that its related to the 2-3-4 Trees.


Solution

  • It means that a black node is limited to having a maximum of one red child and if it has that red child it will appear as the left child. Left-leaning red-black trees model a 2-3 tree instead of a 2-3-4 tree the way the classic red-black tree does.