Exemplo n.º 1
0
        public void GetArrayRotation3And1()
        {
            var res         = CircularArrayRotation.ShiftRightIntArray(new[] { 1, 2, 3 }, 2).ToArray();
            var arrayFormat = String.Format("{0}-{1}", res[1], res[2]);

            Assert.AreEqual("3-1", arrayFormat);
        }
Exemplo n.º 2
0
        public void GetArrayRotation72722And90286()
        {
            var res = CircularArrayRotation.ShiftRightIntArray(new[] { 39356, 87674, 16667, 54260, 43958, 70429, 53682, 6169, 87496, 66190, 90286, 4912, 44792, 65142,
                                                                       36183, 43856, 77633, 38902, 1407, 88185, 80399, 72940, 97555, 23941, 96271, 49288, 27021, 32032, 75662, 69161, 33581, 15017, 56835, 66599, 69277, 17144,
                                                                       37027, 39310, 23312, 24523, 5499, 13597, 45786, 66642, 95090, 98320, 26849, 72722, 37221, 28255, 60906 }, 51).ToArray();

            var arrayFormat = String.Format("{0}-{1}", res[47], res[10]);

            Assert.AreEqual("72722-90286", arrayFormat);
        }