Home > Back-end >  Red and black tree insert problem
Red and black tree insert problem

Time:09-16



Pictured above, insert the new node is red, the parent node, the node as red, then dyeing, grandfather nodes into red, when my grandfather and parent node can be recursively handling,
But when my grandfather node is the root node, how should change?

CodePudding user response:

Directly to the grandfather node C into black?

CodePudding user response:

Will not sink,,,
  • Related