I implement my own version of the red-black tree, mainly basing my algorithms from Wikipedia ( http://en.wikipedia.org/wiki/Red-black_tree ). Its quite brief, for the most part, but there is one part that I would like to clarify.
When deleting a node from a tree in which there are 2 non-leaf (non-NULL) children, it is said that they move the children of each side to the deleted node and delete this child.
I am a little confused as to which side to remove, based on this. Do I randomly select a side, do I alternate between the sides, or do I stick to the same side for each subsequent deletion?
source
share