Ejemplo n.º 1
0
	public static void Test(){
		Node root = new Node(1);
		root.Left = new Node(2);
		root.Right = new Node(3);
		root.Left.Left = new Node(4);
		root.Left.Right = new Node(5);
		root.Right.Left = new Node(6);
		root.Right.Right = new Node(7);
		Siblings sb = new Siblings();
		sb.AttachSiblings(root);
		Console.Write(root.Right.Right.Prev.Data+" == 6");
		Console.Write("\n"+root.Right.Left.Prev.Data+" == 5");
		Console.Write("\n"+(root.Left.Left.Prev==null?"null":"exists")+" == null");
	}