Ejemplo n.º 1
0
        public void TestMethod3()
        {
            List<int> seq = new List<int> { 2, 8, -6, 5, 7, -4, 3, -4, 6 };
            var solver = new MaximumSubArraySolver();
            int maxSum = solver.GetMaximumSubArraySum(seq);

            Assert.IsTrue(maxSum == 17);
        }
Ejemplo n.º 2
0
        public void TestMethod2()
        {
            List<int> seq = new List<int> { 2, 4, -6 };
            var solver = new MaximumSubArraySolver();
            int maxSum = solver.GetMaximumSubArraySum(seq);

            Assert.IsTrue(maxSum == 6);
        }