示例#1
0
        public void MaxDepth_1()
        {
            var root = new TreeNode(3);

            root.left        = new TreeNode(9);
            root.right       = new TreeNode(20);
            root.right.left  = new TreeNode(15);
            root.right.right = new TreeNode(7);
            var expected = 3;
            var actual   = _target.MaxDepth(root);

            Assert.Equal(expected, actual);
        }