Ejemplo n.º 1
0
        public void Test2()
        {
            var s      = new FindSubarrayWithGreatestSum();
            var result = s.Find(new int[] { -8, 3, 2, 0, 5 });

            Assert.That(result == 10);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public void Test1()
        {
            var s      = new FindSubarrayWithGreatestSum();
            var result = s.Find(new int[] { -1, -3, -2 });

            Assert.That(result == -1);
        }