Exemplo n.º 1
0
    private static void CheckIfTreesAreIdenticalCaller()
    {
        var node1 = NewNode(5);

        node1.Left      = NewNode(4);
        node1.Right     = NewNode(3);
        node1.Left.Left = NewNode(6);
        //node.Left.Right = NewNode(7);
        node1.Right.Right = NewNode(10);

        var node2 = NewNode(5);

        node2.Left      = NewNode(4);
        node2.Right     = NewNode(3);
        node2.Left.Left = NewNode(6);
        //node.Left.Right = NewNode(7);
        node2.Right.Right = NewNode(10);

        Console.WriteLine(Problems.CheckIfTreesAreIdentical(node1, node2));

        node2.Left.Right = NewNode(7);
        Console.WriteLine(Problems.CheckIfTreesAreIdentical(node1, node2));
    }