Пример #1
0
        public void GeonomicRangeQuery_Should_Process_Complex_Arrays()
        {
            GeonomicRangeQuery subject = new GeonomicRangeQuery();

            string sequence = "AGCCTACAGCCTAGCCTAGCCTAGCCTAGCCTAGCCTAGCCT";

            int[] leftArray  = { 2, 0, 23, 2, 8, 3, 2 };
            int[] rightArray = { 9, 14, 24, 5, 18, 9, 3 };

            int[] expectedResult = { 1, 1, 2, 1, 1, 1, 2 };

            int[] result = subject.solution(sequence, leftArray, rightArray);

            Assert.Equal(expectedResult, result);
        }
Пример #2
0
        public void GeonomicRangeQuery_Should_Process_Simple_Arrays()
        {
            GeonomicRangeQuery subject = new GeonomicRangeQuery();

            string sequence = "CAGCCTA";

            int[] leftArray  = { 2, 5, 0 };
            int[] rightArray = { 4, 5, 6 };

            int[] expectedResult = { 2, 4, 1 };

            int[] result = subject.solution(sequence, leftArray, rightArray);

            Assert.Equal(expectedResult, result);
        }