public void Test2() { var s = new FindSubarrayWithGreatestSum(); var result = s.Find(new int[] { -8, 3, 2, 0, 5 }); Assert.That(result == 10); }
public void Test3() { var s = new FindSubarrayWithGreatestSum(); var result = s.Find(new int[] { 6, -3, -2, 7, -15, 1, 2, 2 }); Assert.That(result == 8); }
public void Test1() { var s = new FindSubarrayWithGreatestSum(); var result = s.Find(new int[] { -1, -3, -2 }); Assert.That(result == -1); }