public void CanStoreDefaultValueOfT() { var tree = BinaryTree.Create(1, 0, 2); CollectionAssert.AreEqual(new[] { 0, 1, 2 }, tree); }
public void InitializeFromAnArrayAndSort2() { var tree = BinaryTree.Create(2, 4, 1, 7, 3, 9, 5, 6, 8); CollectionAssert.AreEqual(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, tree); }
public static BinaryTree <T> Create(T[] array, BinaryTree <T> tree) { return(new BinaryTree <T>()); }
public BinaryTree() { Head = this; // Value = default(TParametrs); }
public void Reset() { CurrentNode = new BinaryTree <T>(); }
public BinaryTreeEnumerator(BinaryTree <T> node) { this.OriginalTree = node ?? throw new Exception(); //this.CurrentNode = new BinaryTree<T>(); this.CurrentNode = null; }