Beispiel #1
0
        public void PostOrderTest(int treeIndex, string expected)
        {
            BinaryNode[] tree   = _trees[treeIndex];
            string       result = string.Join(",", Traversals.PostOrder(tree[0], tree.GetLeft, tree.GetRight).Select(node => node.ToString()));

            Assert.AreEqual(expected, result);
        }
Beispiel #2
0
        public void PostOrderTest(int treeIndex, string expected)
        {
            var    tree   = _trees[treeIndex];
            string result = string.Join(",", Traversals.PostOrder(tree[0], tree.GetChildren).Select(node => node.ToString()));

            Assert.AreEqual(expected, result);
        }