示例#1
0
 public void Add(T value)
 {
     if (Value.CompareTo(value) != 0)
     {
         if (value.CompareTo(Value) < 0)
         {
             if (Left != null)
             {
                 Left.Add(value);
             }
             else
             {
                 Left = new ABBNode <T> {
                     Value = value, Left = null, Rigth = null
                 }
             }
         }
     }
     ;
示例#2
0
 ///<summary>
 ///</summary>
 ///<param name="Value"></param>
 public ABB(T Value)
 {
     root = new ABBNode <T> {
         Value = Value, Left = null, Rigth = null
     };
 }