Ejemplo n.º 1
0
        public static void Test()
        {
            SocialNetwork sn = new SocialNetwork(10);

            sn.Connect(1, 2);
            sn.Connect(6, 2);
            sn.Connect(9, 2);

            sn.Connect(3, 4);
            sn.Connect(7, 8);
            sn.Connect(4, 7);

            sn.Connect(3, 2);

            Console.WriteLine(sn.FindLargest(1));
            Console.WriteLine(sn.FindLargest(8));
            Console.WriteLine(sn.FindLargest(6));
            Console.WriteLine(sn.FindLargest(9));
        }
Ejemplo n.º 2
0
        public static void Test()
        {
            SocialNetwork sn = new SocialNetwork(10);

            sn.Connect(1, 2);
            sn.Connect(6, 2);
            sn.Connect(9, 2);

            sn.Connect(3, 4);
            sn.Connect(7, 8);
            sn.Connect(4, 7);

            sn.Connect(3, 2);

            Console.WriteLine(sn.FindLargest(1));
            Console.WriteLine(sn.FindLargest(8));
            Console.WriteLine(sn.FindLargest(6));
            Console.WriteLine(sn.FindLargest(9));
        }