public bool Add(ref CNode1 p, int x) { if (p == null) { p = new CNode1(x); return true; } else if (x == p.value) return false; else if (x < p.value) return p.Add(ref p.left, x); else return p.Add(ref p.right, x); }
public CNode1(int x) { value = x; left = right = null; isEdgeMarked = false; }