Exemplo n.º 1
0
        public void TestTwo()
        {
            var input = new List <List <int> >()
            {
                new List <int>()
                {
                    -1, 1, -7, -8
                },
                new List <int>()
                {
                    -10, -8, -5, -2
                },
                new List <int>()
                {
                    0, 9, 7, -1
                },
                new List <int>()
                {
                    4, 4, -2, 1
                }
            };

            var test = new DiagonalSums().diagonalDifference(input);

            Assert.AreEqual(1, test);
        }
Exemplo n.º 2
0
        public void TestOne()
        {
            var input = new List <List <int> >()
            {
                new List <int>()
                {
                    11, 2, 4
                }, new List <int>()
                {
                    4, 5, 6
                },
                new List <int>()
                {
                    10, 8, -12
                }
            };

            var test = new DiagonalSums().diagonalDifference(input);

            Assert.AreEqual(15, test);
        }