Exemplo n.º 1
0
        public void CouldBeRotateArrayGivenPivotTest2()
        {
            int[] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var result2 = Rotate_Array_Given_Pivot.Rotate(array, 6);

            string numbers2 = "7, 8, 9, 10, 1, 2, 3, 4, 5, 6";

            string sResult2 = String.Join(", ", result2);

            Assert.AreEqual(numbers2, sResult2);
        }
Exemplo n.º 2
0
        public void CouldBeRotateArrayGivenPivotTest1()
        {
            int[] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            var result = Rotate_Array_Given_Pivot.Rotate(array, 3);

            string numbers1 = "4, 5, 6, 7, 8, 9, 10, 1, 2, 3";

            string sResult = String.Join(", ", result);

            Assert.AreEqual(numbers1, sResult);
        }