예제 #1
0
        public void Example()
        {
            BinaryTree <string> tree = GetSampleTree();

            output.WriteLine(tree.ToBfstrString());
            Assert.Equal(4, Q01.GetHeightRecursive(tree.Root));
            Assert.True(Q01.IsHeightBalanced(tree));
        }
예제 #2
0
        public void Test_Unbalanced01()
        {
            var tree = GetUnbalancedTree01();

            Assert.False(Q01.IsHeightBalanced(tree));
        }