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

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

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