Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            Node n = new Node(1, new Node(1), new Node(1, new Node(1), null));
            Console.WriteLine("{0}", n.Any(x => x % 2 == 0));

            n = new Node(1, new Node(1), new Node(1, new Node(2), null));
            Console.WriteLine("{0}", n.Any(x => x % 2 == 0));
        }
Exemplo n.º 2
0
 public Node(int val, Node left, Node right)
 {
     this.Val = val;
     this.Right = right;
     this.Left = left;
 }