예제 #1
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);
        }
예제 #2
0
파일: TestCSharp.cs 프로젝트: ajdust/euler
        public void IsCorrectProblem027()
        {
            var problem = new Problem027();

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