Example #1
0
        public void Test10()
        {
            MaxInd el = new MaxInd();

            int[] array = { 3, 3, 3, 3, 3, 3 };
            Assert.AreEqual(el.FindMax(array), 1);
        }
Example #2
0
        public void Test8()
        {
            MaxInd el = new MaxInd();

            int[] array = { 5, 2, 15 };
            Assert.AreEqual(el.FindMax(array), 3);
        }
Example #3
0
        public void Test9()
        {
            MaxInd el = new MaxInd();

            int[] array = { };
            Assert.AreEqual(el.FindMax(array), 0);
        }
Example #4
0
        public void Test7()
        {
            MaxInd el = new MaxInd();

            int[] array = { 2, 6 };
            Assert.AreEqual(el.FindMax(array), 2);
        }
Example #5
0
        public void Test3()
        {
            MaxInd el = new MaxInd();

            int[] array = { 0, 2, 2, 7, 2, 2, 6 };
            Assert.AreEqual(el.FindMax(array), 4);
        }
Example #6
0
        public void Test2()
        {
            MaxInd el = new MaxInd();

            int[] array = { 0, 3, 5, 7, 2, 8, 6 };
            Assert.AreEqual(el.FindMax(array), 6);
        }
Example #7
0
        public void Test1()
        {
            MaxInd el = new MaxInd();

            int[] array = { 1, 4, 7, 3, 6, 3 };
            Assert.AreEqual(el.FindMax(array), 3);
        }
Example #8
0
 private void PutSequence(long beginNo)
 {
     for (var i = beginNo.ToString().Length - 1; i <= MaxInd.ToString().Length - 1; i++)
     {
         for (var j = 1; j < 10; j++)
         {
             var seq = (long)(j * Pow(10, i) + 0.5);
             if (seq < beginNo)
             {
                 continue;
             }
             if (seq >= MaxInd)
             {
                 return;
             }
             var l = this[(int)(MaxInd - _offSet - 1 - (MaxInd - seq))];
             var s = CDfString(seq) + "|" + l;
             seqList.Add(s);
             if (_mode > 1)
             {
                 Console.WriteLine("==>[No:] " + s);
             }
         }
     }
 }