Beispiel #1
0
        public void Test2()
        {
            int[] expected = new int[] { 1, 2 };
            int[] input    = new int[] { -1, 2, 3 };
            var   actual   = Class16.TargetSumSubarray(input, 5);

            Assert.Equal(expected, actual);
        }
Beispiel #2
0
        public void Test4()
        {
            int[] expected = null;
            int[] input    = null;
            var   actual   = Class16.TargetSumSubarray(input, 5);

            Assert.Equal(expected, actual);
        }
Beispiel #3
0
        public void Test1()
        {
            int[] expected = new int[] { 0, 3 };
            int[] input    = new int[] { 2, 4, -2, 1, -3, 5, -3 };
            var   actual   = Class16.TargetSumSubarray(input, 5);

            Assert.Equal(expected, actual);
        }