public void SolveTest()
        {
            var rootNode = new BinaryTreeNode(8,
                                              new BinaryTreeNode(6,
                                                                 new BinaryTreeNode(5),
                                                                 new BinaryTreeNode(7)),
                                              new BinaryTreeNode(10,
                                                                 new BinaryTreeNode(9),
                                                                 new BinaryTreeNode(11)));

            string solution = Problem012.Solve(rootNode);

            Assert.AreEqual("8 6 10 5 7 9 11", solution);
        }
Exemple #2
0
        public void IsCorrectProblem012()
        {
            var problem = new Problem012();

            Assert.Equal(Answers["12"], problem.Solve());
        }