Exemplo n.º 1
0
        static void BiggestSquareInMatrix()
        {
            //int[,] array2D = new int[,] { { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1},
            //                              { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1},
            //                              { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1},
            //                              { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1},
            //                              { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1},
            //                              { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1},
            //                           };

            int[,] array2D = new int[, ] {
                { 1, 1, 1, 1, 1 },
                { 0, 0, 1, 1, 1 },
                { 1, 1, 1, 1, 1 },
                { 0, 0, 1, 0, 0 },
                { 1, 1, 1, 1, 1 },
            };
            var obj = new CareerCupQnA();

            obj.BiggestSquareInMatrix(array2D, 1);

            obj.PrintSquares();
        }