示例#1
0
        public void Problem027()
        {
            var problem = new Problem027()
            {
                ConsoleOutput = false, DetailedOutput = false
            };

            Assert.AreEqual(-59231L, problem.Answer());
        }
示例#2
0
        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)));

            int depth = Problem027.Solve(rootNode);

            Assert.AreEqual(3, depth);
        }
示例#3
0
        public void IsCorrectProblem027()
        {
            var problem = new Problem027();

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