我正在尝试遵循算法简介第三版中的RB-DELETE-FIXUP。他们有这样的代码:
RB-DELETE-FIXUP(T, x)
1 while x != root[T] and color[x] == BLACK
2 do if x == left[p[x]]
3 then w = right[p[x]]
4 if color[w] == RED
5 then color[w] = BLACK ? Case 1
6
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Read_Drawn
{
public partial class Form1 : Form
{
public For