/// <summary><para>Performs a rebalance of the <see cref="RBTree{T}"/> starting with the current node.</para></summary> private void DeleteRebalanceCondition5() { if (Sibling.Color == Colors.Black) { if (this == Parent.Left && Sibling.Right?.Color == Colors.Black && Sibling.Left?.Color == Colors.Red) { Sibling.Color = Colors.Red; Sibling.Left.Color = Colors.Black; Sibling.RotateRight(); } else if (this == Parent.Right && Sibling.Left?.Color == Colors.Black && Sibling.Right?.Color == Colors.Red) { Sibling.Color = Colors.Red; Sibling.Right.Color = Colors.Black; Sibling.RotateLeft(); } } DeleteRebalanceCondition6(); }