Beispiel #1
0
        public void ReduceArrayEvenLengthTest()
        {
            ReduceController red = new ReduceController();

            int[][] answer = new int[4][]
            {
                new int[] { 2, 1, 1, 3 },
                new int[] { 1, 2, 3, 1 },
                new int[] { 1, 3, 2, 1 },
                new int[] { 3, 1, 1, 2 }
            };


            Assert.AreEqual("4", red.GetReduced(answer));
        }
Beispiel #2
0
        public void ReduceArrayOddTest()
        {
            ReduceController red2 = new ReduceController();

            int[][] answer = new int[5][]
            {
                new int[] { 2, 1, 1, 1, 3 },
                new int[] { 1, 2, 1, 3, 1 },
                new int[] { 1, 1, 2, 1, 1 },
                new int[] { 1, 3, 1, 2, 1 },
                new int[] { 3, 1, 1, 1, 2 }
            };
            //10 vs  14


            Assert.AreEqual("4", red2.GetReduced(answer));
        }