Пример #1
0
 private void solutionButton_Click(object sender, EventArgs e)
 {
     int[] result = subsequence.FindSubsequence(
         MasStringsUtilits.StrToArray <int>(arrayInputTB.Text));
     outputTB.Text     = MasStringsUtilits.ArrayToStr <int>(result, "\t");
     firstIndexTB.Text = subsequence.firstIndex.ToString();
     legtnTB.Text      = result.Length.ToString();
 }
Пример #2
0
        public void TestMethodSequence()
        {
            List <int> newList = new List <int>();

            newList.Add(5);

            List <int> seuence = Subsequence.FindSubsequence(newList);

            Assert.AreEqual(5, seuence[0]);
        }
Пример #3
0
        public void TestMethodSequence2()
        {
            List <int> list = new List <int>()
            {
                1, 2, 2, 2, 3, 2, 4, 5, 5, 5, 5, 7, 8
            };

            List <int> seuence = Subsequence.FindSubsequence(list);

            for (int i = 0; i < seuence.Count; i++)
            {
                Assert.AreEqual(5, seuence[i]);
            }
        }