public void BinaryTree_Preorder_test() { var tree = new AVLBinaryTree <int>(6, 55, -55, -40, 8, 66, 554, 74, 12, 7); var ordered = new[] { 55, 6, -55, -40, 8, 7, 12, 66, 554, 74 }; var preorder = tree.Preorder() .ToArray(); CollectionAssert.AreEqual(ordered, preorder); }
public void AVLBinaryTreePreorder() => _avl.Preorder();