public void Insert(Tree tree) { if(tree._key < _key) Left = tree; else Right = tree; }
public ArrayList Sort(ArrayList inArray) { if (inArray.Count < 1) return inArray; var tree = new Tree((int)inArray[0]); for (int i = 1; i < inArray.Count; i++ ) tree.Insert(new Tree((int)inArray[i])); return tree.ToArrayList(); }