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); }
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); }
public void TestMethod1() { List<int> seq = new List<int> { 2, 4, -6}; var solver = new MaximumSubArraySolver(); List<int> maxSubArray = solver.GetMaximumSubArray(seq); Assert.IsTrue(maxSubArray.Contains(2)); Assert.IsTrue(maxSubArray.Contains(4)); }