cs.delight4.com

Type a sequence, then click Generate or press Enter.

To delete a key, put - before it (for example, -7 or -A). With negative values enabled, use x2 or 2x to delete 2.

Conventions & rules for this topic

Red-black trees follow CLRS, not the left-leaning variant. New nodes are red; a two-child deletion uses the inorder successor; showing NIL leaves is optional.

Buttons

  • Generate โ€” shows each tree step by step from the sequence.
  • Import โ€” starts with an existing tree, such as one in an exam question.
  • Random โ€” creates a random sequence for practice.
  • Clear โ€” removes the sequence and tree.
  • Print โ€” prints the generation steps of the current tree.
  • Workbook โ€” creates printable practice problems.