示例#1
0
文件: CNode1.cs 项目: agudulin/proga
 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);
 }
示例#2
0
文件: CNode1.cs 项目: agudulin/proga
 public CNode1(int x)
 {
     value = x;
     left = right = null;
     isEdgeMarked = false;
 }