Exemplo n.º 1
0
        public void IsSymmetricRecursive_RootTree_ShouldReturnTrue()
        {
            TreeNode tree = new TreeNode(5);

            var result = IsSymmetricImplementation.IsSymmetricRecursive(tree);

            Assert.True(result);
        }
Exemplo n.º 2
0
        public void IsSymmetricRecursive_FromLeetCode_ShouldReturnFalse()
        {
            var tree = TreeNode.CreateTree(new int?[] { 1, 2, 2, null, 3, null, 3 });

            var result = IsSymmetricImplementation.IsSymmetricRecursive(tree);

            Assert.False(result);
        }