public void TestIterativeDepthFirstPostOrderSearch(IEnumerable <int> expected, BinaryTreeNode root) { var sut = new BinaryTreeNodeTraverser(); var actual = sut.TraverseDfsPostOrderIterativelyUsingDoubleStack(root); Assert.True(expected.SequenceEqual(actual)); }
public void TestRecursiveDepthFirstInOrderSearch(IEnumerable <int> expected, BinaryTreeNode root) { var sut = new BinaryTreeNodeTraverser(); var actual = sut.TraverseDfsInOrderRecursively(root); Assert.True(expected.SequenceEqual(actual)); }