1. Every simple path from a node to a descendant leaf contains the same number of black nodes
  2. If a node is red, then one children is red and another is black
  3. If a node is red, then both its children are red
  4. Every leaf node (sentinel node) is red
4 views

1 Answers

Option 1 : Every simple path from a node to a descendant leaf contains the same number of black nodes

A red-black tree is a balanced binary search tree with the following properties:

  • Every node is colored red or black.
  • Every leaf is a NIL node and is colored black.
  • If a node is red, then both its children are black.
  • Every simple path from a node to a descendant leaf contains the same number of black nodes.
4 views

Related Questions